Message136280
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. |
|
Date |
User |
Action |
Args |
2011-05-19 11:54:28 | vstinner | set | recipients:
+ vstinner |
2011-05-19 11:54:28 | vstinner | set | messageid: <1305806068.46.0.0788802994526.issue12112@psf.upfronthosting.co.za> |
2011-05-19 11:54:27 | vstinner | link | issue12112 messages |
2011-05-19 11:54:27 | vstinner | create | |
|