Hi, Nick Coghlan pushed his implementation of his PEP 538: nice! Nice step forward to UTF-8 everywhere ;-)
I would prefer to not be annoyed by warning messages about encodings at startup if possible: "Python detected LC_CTYPE=C: LC_CTYPE coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior)." Python 3.7 is the only programming language that I know that complains about encoding at startup. Even if my code is 100% valid, PEP 8 compliant, don't emit any warning, etc. I will get the warning. It is *not* possible to ignore the warning... Like "yeah, I know that my locale is C, but it's not like I'm able to configure it." haypo@selma$ export LANG= haypo@selma$ locale LANG= LC_CTYPE="POSIX" ... haypo@selma$ ./python -c 'print("Hello World!")' # Python 3.7 Python detected LC_CTYPE=C: LC_CTYPE coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior). Hello World! haypo@selma$ python2 -c 'print("Hello World!")' # Python 2.7 Hello World! haypo@selma$ perl -e 'print "Hello, world!\n"' # Perl 5.24 Hello, world! haypo@selma$ ./c # C Hello World! ... Note: I don't consider that 2>/dev/null is a good practice to ignore a single warning, since it will ignore *all* message written into stderr, including useful warnings like ResourceWarning or "Exception ignored ...". Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com