[Python-Dev] Changing exception text in micro releases

2021-09-24 Thread Eric V. Smith
This PR https://github.com/python/cpython/pull/28310 changes the message for some exceptions. Currently: >>> format('', '%M') Traceback (most recent call last):   File "", line 1, in ValueError: Invalid format specifier With the proposed change: >>> format('', '%M') Traceback (most recent cal

[Python-Dev] PEP-646 question: unpacking into single Generic parameter

2021-09-24 Thread willi
Hello, first of all, thanks for working on variadic generics! I look forward to them. My question: all the examples in https://www.python.org/dev/peps/pep-0646/ unpack into variadic arguments. But can I write code like this? ``` Ts = TypeVarTuple("Ts") def enumerate_args(f: Callable[[*Tuple[in

[Python-Dev] Re: Changing exception text in micro releases

2021-09-24 Thread Filipe Laíns
On Fri, 2021-09-24 at 09:51 -0400, Eric V. Smith wrote: > This PR https://github.com/python/cpython/pull/28310 changes the message > for some exceptions. > > Currently: > >  >>> format('', '%M') > Traceback (most recent call last): >    File "", line 1, in > ValueError: Invalid format specifier

[Python-Dev] Re: Changing exception text in micro releases

2021-09-24 Thread Ethan Furman
On 9/24/21 6:51 AM, Eric V. Smith wrote: > This is clearly an improvement. My question is: is it okay to backport this to 3.9 and 3.10? I > think we have a rule that it's okay to change the exception text, but I'm not sure how that > applies to micro releases (3.9.x, 3.10.1). "better" != "bug

[Python-Dev] Re: Changing exception text in micro releases

2021-09-24 Thread Eric V. Smith
On 9/24/2021 10:39 AM, Ethan Furman wrote: On 9/24/21 6:51 AM, Eric V. Smith wrote: > This is clearly an improvement. My question is: is it okay to backport this to 3.9 and 3.10? I > think we have a rule that it's okay to change the exception text, but I'm not sure how that > applies to micr

[Python-Dev] Re: Changing exception text in micro releases

2021-09-24 Thread Terry Reedy
On 9/24/2021 10:46 AM, Eric V. Smith wrote: On 9/24/2021 10:39 AM, Ethan Furman wrote: On 9/24/21 6:51 AM, Eric V. Smith wrote: > This is clearly an improvement. My question is: is it okay to backport this to 3.9 and 3.10? I > think we have a rule that it's okay to change the exception text,

[Python-Dev] Summary of Python tracker Issues

2021-09-24 Thread Python tracker
ACTIVITY SUMMARY (2021-09-17 - 2021-09-24) 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: open7333 (-48) closed 49684 (+97) total 57017 (+49) Open issues wi

[Python-Dev] Re: Changing exception text in micro releases

2021-09-24 Thread Guido van Rossum
In this case I am inclined not to backport. In general we should look at existing usage before making changes. Somebody’s code might break — but does it matter? That depends on a lot of factors. E.g. if parsing an error message has become a common way to get useful info out of the error that is no

[Python-Dev] Re: Changing exception text in micro releases

2021-09-24 Thread Eric V. Smith
On 9/24/2021 4:53 PM, Guido van Rossum wrote: In this case I am inclined not to backport. I agree. I decided not to backport it. In general we should look at existing usage before making changes. Somebody’s code might break — but does it matter? That depends on a lot of factors. E.g. if parsin

[Python-Dev] Accepting PEP 654.

2021-09-24 Thread Thomas Wouters
Irit, Guido, Yuri, Nathaniel, (In the interest of visibility, this was also posted to discuss.python.org .) After careful consideration and rather lengthy discussion, the Steering Council has decided to accept PEP

[Python-Dev] Re: Accepting PEP 654.

2021-09-24 Thread Thomas Wouters
On Sat, Sep 25, 2021 at 12:06 AM Thomas Wouters wrote: > > Irit, Guido, Yuri, Nathaniel, > I do apologise for the typo in your name, Yury... somehow none of us caught it in our proofreading of the response :( I fixed it on Discourse with an edit, but email, alas... -- Thomas Wouters Hi! I'm

[Python-Dev] Re: Accepting PEP 654.

2021-09-24 Thread Yury Selivanov
Ah, that's no problem, both spellings are good. Since I'm replying on Pyhton-dev, I'll quote my Discord response here: "Thank you Thomas and the SC. I’ll start working on incorporating TaskGroups into asyncio in the next few weeks." Thanks, Yury On Fri, Sep 24, 2021 at 3:13 PM, Thomas Wouters

[Python-Dev] Re: PEP-646 question: unpacking into single Generic parameter

2021-09-24 Thread Mehdi2277
I don't believe this is supported in pep 646 today. It was originally going to be supported with a Map operator. With a Map operator it would let you do something like, T = TypeVar('T') Ts = TypeVarTuple("Ts") IndexedTuple = Tuple[Int, T] def enumerage_args(*args: *Ts) -> *Map[IndexedTuple, Ts]