This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2011-05-19.11:54:27
SpamBayes Score 5.551115e-17
Marked as misclassified No
Message-id <1305806068.46.0.0788802994526.issue12112@psf.upfronthosting.co.za>
In-reply-to
Content
The locale encoding is not portable, packaging should use UTF-8 instead.

Attached patch is a draft to workaround "LANG=C ./python -m test test_packaging" failures. I'm not sure that my test in Metadata.write_file() of packaging.metadata is a good idea.

Moreover, packaging should also maybe use the surrogateescape error handler, but I propose to decide that later and in another issue. We may use this error handler only to read files (like the Python makefile).

For write a complete patch, *all* calls to open() in Lib/packaging/* (including Lib/packaging/tests/*) should be checked.

distutils uses the locale encoding, which is UTF-8 on Mac OS X and most Linux setup (but never on Windows). But distutils cannot be fixed, whereas packaging is a new module and can be fixed.
History
Date User Action Args
2011-05-19 11:54:28vstinnersetrecipients: + vstinner
2011-05-19 11:54:28vstinnersetmessageid: <1305806068.46.0.0788802994526.issue12112@psf.upfronthosting.co.za>
2011-05-19 11:54:27vstinnerlinkissue12112 messages
2011-05-19 11:54:27vstinnercreate