Accepting PEP 597 (Add optional EncodingWarning)
Hi Inada,
Thank you for submitting PEP 597 (Add optional EncodingWarning). The Steering Council is happy with the PEP, and hereby accepts it. The SC is of the opinion that we should move towards making UTF-8 the default encoding, and this PEP will make it easier to do so, and mitigate some of the confusion around the default encoding in the meantime.
That being said, the SC would like to invite you and others with interest to work on a PEP for a long term plan to, in fact, change the default encoding to UTF-8. We don't want to make irrevocable decisions until we have a clear, viable plan with a good upgrade path and with community support, but we do believe we need to make that decision sooner rather than later.
With thanks from the whole Python Steering Council, Thomas.
Thomas Wouters <thomas@python.org>
Hi! I'm an email virus! Think twice before sending your email to help me spread!
Congratulation INADA-san! I'm impressed by your tenacity :-)
Last months, I followed your different propositions on discuss.python.org to use UTF-8 by default in Python. It's good to see the first non-controversial part being accepted! I hope that this PEP will help to move towards a world where we don't guess encodings anymore, but make them very explicit!
Once the whole stdlib and most of top PyPI projects will be fixed to no longer emit EncodingWarning, I will become safer to opt-in for UTF-8 by default by enabling the Python UTF-8 Mode! https://docs.python.org/dev/library/os.html#python-utf-8-mode
One day, we will silently switch Python to UTF-8 by default, and nobody will notice! ;-)
Victor
On Mon, Mar 15, 2021 at 7:46 PM Thomas Wouters <thomas@python.org> wrote:
Hi Inada,
Thank you for submitting PEP 597 (Add optional EncodingWarning). The Steering Council is happy with the PEP, and hereby accepts it. The SC is of the opinion that we should move towards making UTF-8 the default encoding, and this PEP will make it easier to do so, and mitigate some of the confusion around the default encoding in the meantime.
That being said, the SC would like to invite you and others with interest to work on a PEP for a long term plan to, in fact, change the default encoding to UTF-8. We don't want to make irrevocable decisions until we have a clear, viable plan with a good upgrade path and with community support, but we do believe we need to make that decision sooner rather than later.
With thanks from the whole Python Steering Council, Thomas.
Thomas Wouters <thomas@python.org>
Hi! I'm an email virus! Think twice before sending your email to help me spread!
python-committers mailing list -- python-committers@python.org To unsubscribe send an email to python-committers-leave@python.org https://mail.python.org/mailman3/lists/python-committers.python.org/ Message archived at https://mail.python.org/archives/list/python-committers@python.org/message/Y... Code of Conduct: https://www.python.org/psf/codeofconduct/
-- Night gathers, and now my watch begins. It shall not end until my death.
On Mon, Mar 15, 2021 at 3:58 PM Victor Stinner <vstinner@python.org> wrote:
Congratulation INADA-san! I'm impressed by your tenacity :-)
+1. Great work!
Last months, I followed your different propositions on discuss.python.org to use UTF-8 by default in Python. It's good to see the first non-controversial part being accepted! I hope that this PEP will help to move towards a world where we don't guess encodings anymore, but make them very explicit!
Actually, the "north star" here is a world where nobody has to think about encodings any more. That, and world peace.
Once the whole stdlib and most of top PyPI projects will be fixed to no longer emit EncodingWarning, I will become safer to opt-in for UTF-8 by default by enabling the Python UTF-8 Mode! https://docs.python.org/dev/library/os.html#python-utf-8-mode
One day, we will silently switch Python to UTF-8 by default, and nobody will notice! ;-)
In particular it's important that nobody living in Japan or China should notice. This is also still the biggest challenge. :-(
-- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
Thank you, Council members and all members joined in the long discussion.
On Tue, Mar 16, 2021 at 8:29 AM Guido van Rossum <guido@python.org> wrote:
Once the whole stdlib and most of top PyPI projects will be fixed to no longer emit EncodingWarning, I will become safer to opt-in for UTF-8 by default by enabling the Python UTF-8 Mode! https://docs.python.org/dev/library/os.html#python-utf-8-mode
One day, we will silently switch Python to UTF-8 by default, and nobody will notice! ;-)
In particular it's important that nobody living in Japan or China should notice. This is also still the biggest challenge. :-(
Java has a very similar problem and proposal. See JEP 400 (*) that was
updated recently.
If JEP 400 is accepted, users can use -Dfile.encoding=COMPAT
for
legacy behavior.
If UTF-8 mode is enabled by default, users can use PYTHONUTF8=0
or
-Xutf8=0
for legacy behavior.
(*) https://openjdk.java.net/jeps/400
Anyway, PEP 597 adds encoding="locale"
option. Let's implement it in
Python 3.10 and wait 4 years.
Many libraries will use only UTF-8, or can drop Python 3.9 support and
use encoding="locale"
where locale encoding is needed.
Regards,
-- Inada Naoki <songofacandy@gmail.com>
participants (4)
-
Guido van Rossum
-
Inada Naoki
-
Thomas Wouters
-
Victor Stinner