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 Arfrever, a.badger, eric.araujo, hagen, ikelos, lemburg, mgorny, tarek, vstinner
Date 2011-06-30.22:04:56
SpamBayes Score 1.139977e-12
Marked as misclassified No
Message-id <1309471497.16.0.648321847057.issue9561@psf.upfronthosting.co.za>
In-reply-to
Content
> Okay.  I guess you’ll use codecs.open in 2.7

Oh, Python 2.7... DistributionMetadata of distutils encodes most values to byte strings (get_xxx() methods calls self._encode_field). It would be possible to use codecs.open(), but an Unicode file expects Unicode strings. The problem is that the user may provide arbitrary byte strings, I mean strings not encoded to PKG_INFO_ENCODING. Even if such strings are *wrong* (not correctly encoded), is it a good idea to be more strict in a minor version (2.7.x)?

I don't want to be responsible of such tricky change, I prefer to leave distutils unchanged in Python 2.7 (at least for PKG-INFO).

> please make sure there is no bootstrapping issue
> for the build of CPython itself.

I checked, there is not bootstrap issue.
History
Date User Action Args
2011-06-30 22:04:57vstinnersetrecipients: + vstinner, lemburg, tarek, eric.araujo, hagen, a.badger, Arfrever, ikelos, mgorny
2011-06-30 22:04:57vstinnersetmessageid: <1309471497.16.0.648321847057.issue9561@psf.upfronthosting.co.za>
2011-06-30 22:04:56vstinnerlinkissue9561 messages
2011-06-30 22:04:56vstinnercreate