6/29/2023 0 Comments Pass text encoding to popen![]() ![]() Of the 4000 most downloaded packages from PyPI, 489 use non-ASCIIĬharacters in their README, and 82 fail to install from source on emoji, author names, copyright symbols, and the like) Such packages if there is at least one non-ASCII character Motivation Using the default encoding is a common mistakeĭevelopers using macOS or Linux may forget that the default encodingįor example, using long_description = open("README.md").read() in ItĮxplicitly specifies that the locale encoding should be used, silencing A new -X warn_default_encodingĬommand-line option and a new PYTHONWARNDEFAULTENCODING environmentĪ "locale" argument value for encoding is added too. It is emitted when theĮncoding argument to open() is omitted and the default Prepare to change the default encoding to UTF-8Īdd a new warning category EncodingWarning.Explicit way to use locale-specific encoding.Using the default encoding is a common mistake.PEP 597 – Add optional EncodingWarning PEP 597 Title Add optional EncodingWarning Author Inada Naoki Status Final Type Standards Track Created 0 Python-Version 3.10 ![]() PEP 597 – Add optional EncodingWarning | Python Enhancement Proposals
0 Comments
Leave a Reply. |