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 "<stdin>", line 1, in <module>
> ValueError: Invalid format specifier
> 
> With the proposed change:
>  >>> format('', '%M')
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> ValueError: Invalid format specifier '%M' for object of type 'str'
> 
> This also applies to str.format() and f-strings.
> 
> 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).
> 
> Eric

People might be depending on the exception text. Tests would probably be the
most relevant example. OTOH, the breakage shouldn't be that big, and probably
depending on exception strings in situations like this is not great.

If we are being safe, I'd probably avoid it.

According to the devguide[1], micro versions are bugfixes releases, which this
is not, so I'd say the patch should not be backported.

However, I don't know if there is maybe another guideline or precedent.

[1] https://devguide.python.org/devcycle

Cheers,
Filipe Laíns

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/W2LQZ44GERUVGNNQOD6UJKK3LRPYBOAP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to