On Tue, 9 Feb 2021 at 16:52, Anders Munch <a...@flonidan.dk> wrote:
> How about swapping around "locale" and None?  That is, make "locale" the new 
> default that emits a warning, and encoding=None emits no warning.  That has 
> the advantage that old code can be updated to say encoding=None, and then it 
> will work on both old and new Pythons without warning.

I don't understand why working code should have to change *twice*. I'm
fine with the idea that people *actually* relying on the current
default will need to switch when the default changes, but making them
change once to silence the warning and then again to explicitly select
the old default is pretty annoying.

If we don't want people to use the default encoding, we should just
make encoding a required argument and stop pretending. If omitting the
encoding and using the default is intended to be a supported usage,
then we should *not* penalise people doing that. Changing the default
is a backward-incompatible change, that's enough of an inconvenience.
Changing the (behaviour of the) default *twice* is just making things
worse.

Paul
_______________________________________________
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/36HJRYU6R6NEDZY7QSKS3DEKRY6OLTI4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to