[Python-Dev] Re: pth file encoding

2021-03-19 Thread Dan Stromberg
On Wed, Mar 17, 2021 at 1:11 AM Michał Górny wrote: > On Wed, 2021-03-17 at 13:55 +0900, Inada Naoki wrote: > > OK. setuptools doesn't specify encoding at all. So locale-specific > > encoding is used. > > We can not fix it in short term. > > How about writing paths as bytestrings in the long term

[Python-Dev] Re: Merge Request Review Reminder

2021-03-19 Thread Guido van Rossum
Honestly this is an example of a module that would have been better off outside the stdlib. On Fri, Mar 19, 2021 at 14:43 Senthil Kumaran wrote: > On Mon, Feb 15, 2021 at 8:36 AM Faisal Mahmood > wrote: > > > > Hello, > > > > I hope you are all well, I currently have an issue / merge request th

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Terry Reedy
On 3/19/2021 6:11 PM, Joshua Bronson wrote: Discussion here so far is converging on resurrecting my original PR from 2018 adding these to operator. I prefer this too. -- Terry Jan Reedy ___ Python-Dev mailing list -- python-dev@python.org To unsubsc

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Joshua Bronson
Thanks for all the feedback so far (and for the kind words, Guido! 😊). Discussion here so far is converging on resurrecting my original PR from 2018 adding these to operator. Anyone else we should hear from before considering the more recent PR not worth pursuing for now? Would be good to hear fro

[Python-Dev] Re: Merge Request Review Reminder

2021-03-19 Thread Senthil Kumaran
On Mon, Feb 15, 2021 at 8:36 AM Faisal Mahmood wrote: > > Hello, > > I hope you are all well, I currently have an issue / merge request that has > become stale and as per the guidelines I am sending this e-mail to request > someone to review it for me please. > > Issue Number: 42861 (https://bug

[Python-Dev] Re: Merge Request Review Reminder

2021-03-19 Thread Brett Cannon
On Fri, Mar 19, 2021 at 9:29 AM Faisal Mahmood wrote: > Hello, > > Following my previous e-mail last month, thank you for responding. I > almost immediately got two reviewers who posted helpful comments on my PR > which I believe have all been resolved now. > > Today, I got a notification to say

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Brett Cannon
I personally would be okay with aiter() (with the modern API 😉) and next() in the `operator` module. There's already precedent in having things there that are rarely used directly but still implement the use of a special method, e.g. operator.index() ( https://docs.python.org/3/library/operator.htm

[Python-Dev] Re: Merge Request Review Reminder

2021-03-19 Thread Paul Moore
On Fri, 19 Mar 2021 at 17:26, Hasan Diwan wrote: > > For the side question, you can always use rebase instead of merge. Let me > know if you need further particulars? -- H There should be no need though, as the Python project has a policy of squash-merging all PRs. Paul

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Joao S. O. Bueno
On Fri, 19 Mar 2021 at 14:38, Paul Bryan wrote: > On Fri, 2021-03-19 at 10:22 -0700, Guido van Rossum wrote: > > I’m not convinced that we need aiter(x, sentinel) at all — for iter() it’s > mostly a legacy compatibility API. > > > I'm feel like I'm going to learn something today. To date, the pat

[Python-Dev] Summary of Python tracker Issues

2021-03-19 Thread Python tracker
ACTIVITY SUMMARY (2021-03-12 - 2021-03-19) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7481 ( +3) closed 47813 (+75) total 55294 (+78) Open issues w

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Luciano Ramalho
I see the value of having `aiter` and `anext` in the standard library, mostly because we should not encourage people to call dunder methods themselves unless they are doing something really tricky. Also, if written in C, those functions may save the attribute fetch overhead of a method call for as

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Paul Bryan
I did learn something today! 🙂 On Fri, 2021-03-19 at 10:37 -0700, Guido van Rossum wrote: > I was only talking about the two-argument version, iter(x, sentinel). > Betcha you didn’t even know that existed. :-) > > On Fri, Mar 19, 2021 at 10:34 Paul Bryan wrote: > > On Fri, 2021-03-19 at 10:22 -0

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Guido van Rossum
I was only talking about the two-argument version, iter(x, sentinel). Betcha you didn’t even know that existed. :-) On Fri, Mar 19, 2021 at 10:34 Paul Bryan wrote: > On Fri, 2021-03-19 at 10:22 -0700, Guido van Rossum wrote: > > I’m not convinced that we need aiter(x, sentinel) at all — for iter

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Paul Bryan
On Fri, 2021-03-19 at 10:22 -0700, Guido van Rossum wrote: > I’m not convinced that we need aiter(x, sentinel) at all — for iter() > it’s mostly a legacy compatibility API. I'm feel like I'm going to learn something today. To date, the pattern I've used for getting the first item from an iterable

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Guido van Rossum
No, and there shouldn’t be written criteria. That would just give people more incentive to argue forever. On Fri, Mar 19, 2021 at 10:12 Luciano Ramalho wrote: > Now is a good time to ask: what are the criteria for adding functions to > the builtins module? > > Is there a written record of those

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Guido van Rossum
I assume that one of the concerns is that these functions are trivial. aiter(x) is just x.__aiter__(), and anext(it) is just it.__next__(). I’m not convinced that we need aiter(x, sentinel) at all — for iter() it’s mostly a legacy compatibility API. If you use these a lot it’s simple enough to add

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Paul Bryan
Sample size of 1: I have code calling __aiter__ and __anext__. It would be nice to have representative functions—in some module—for the 3.10 release. I would think the bar for inclusion in builtins should be quite high. Looking at what's in the operator module, it does seem like a more appropriate

[Python-Dev] Re: Merge Request Review Reminder

2021-03-19 Thread Hasan Diwan
For the side question, you can always use rebase instead of merge. Let me know if you need further particulars? -- H On Fri, 19 Mar 2021 at 09:31, Faisal Mahmood wrote: > Hello, > > Following my previous e-mail last month, thank you for responding. I > almost immediately got two reviewers who

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Luciano Ramalho
Now is a good time to ask: what are the criteria for adding functions to the builtins module? Is there a written record of those criteria? Thanks! On Fri, Mar 19, 2021 at 1:55 PM Luciano Ramalho wrote: > OK, but it seems clear to me that if there are any lingering doubts it > would be better

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Luciano Ramalho
OK, but it seems clear to me that if there are any lingering doubts it would be better to add the functions to a module than to the built-ins, and later promote them to built-ins if people actually find them widely useful. On the other hand, adding something to built-ins that turns out to be rarel

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Joshua Bronson
Thanks for taking a look at this, Luciano. Yury immediately replied to the comment from Jelle that you quoted with the following: > Do these really need to be builtins? > > We're only beginning to see async iterators being used in the wild, so we > c

[Python-Dev] Re: Merge Request Review Reminder

2021-03-19 Thread Faisal Mahmood
Hello, Following my previous e-mail last month, thank you for responding. I almost immediately got two reviewers who posted helpful comments on my PR which I believe have all been resolved now. Today, I got a notification to say my branch is stale again so wanted to understand what the next step

[Python-Dev] Re: aiter/anext review request

2021-03-19 Thread Luciano Ramalho
Thanks for working on this, Joshua. I agree 100% with Jelle Zijlstra in the issue tracker: Do these really need to be builtins? They seem too specialized to be widely useful; I've personally never needed them in any async code I've written. It would make more sense to me to put them in a module l