Re: PEP 597: Add optional EncodingWarning

On Tue, 9 Feb 2021 at 16:52, Anders Munch <ajm@flonidan.dk> wrote:
The idea is to make is so that working code only needs to change once, even when supporting multiple Python versions. That one change is to add either an explicit encoding=None (for backwards-compatibility) or an explicit encoding='utf-8' (because that was intended all along). No twice about it, one change. regards, Anders

On Wed, 10 Feb 2021 at 14:33, Anders Munch <ajm@flonidan.dk> wrote:
But then people who added an explicit utf-8 encoding need to remove the encoding argument again once the default value changes. Your proposal leads to a situation where no-one leaves the encoding argument to default. If we're going to permanently discourage omitting the encoding argument, we should just make it mandatory (a change that I'll argue against, but no-one is currently proposing it, luckily). Paul

On 2/10/2021 10:29 AM, Paul Moore wrote:
Except that all code written after the default has changed (and all python versions without that default are no longer supported) won't need to specify utf-8. And presumably there's more code to be written in the future than already exists. Eric

On Wed, 10 Feb 2021 at 14:33, Anders Munch <ajm@flonidan.dk> wrote:
But then people who added an explicit utf-8 encoding need to remove the encoding argument again once the default value changes. Your proposal leads to a situation where no-one leaves the encoding argument to default. If we're going to permanently discourage omitting the encoding argument, we should just make it mandatory (a change that I'll argue against, but no-one is currently proposing it, luckily). Paul

On 2/10/2021 10:29 AM, Paul Moore wrote:
Except that all code written after the default has changed (and all python versions without that default are no longer supported) won't need to specify utf-8. And presumably there's more code to be written in the future than already exists. Eric
participants (3)
-
Anders Munch
-
Eric V. Smith
-
Paul Moore