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 eric.araujo
Recipients RonnyPfannschmidt, alexis, eric.araujo, jaraco, jens, lars.gustaebel, mikehoy, mu_mind, tarek, vstinner
Date 2011-12-21.17:10:44
SpamBayes Score 6.550316e-15
Marked as misclassified No
Message-id <1324487445.4.0.794595123843.issue11638@psf.upfronthosting.co.za>
In-reply-to
Content
Lars: I will check the history to see if there is a reason (there is probably none) and apply your patch, thank you.

Jason: Thanks for the input.

> It's not obvious to me what the encoding should be. Python and the tarfile module can
> accept unicode filenames.
Note that distutils2 supports back to 2.4, which may not be as convenient.

> It seems that only the gzip part of tarfile fails if a unicode name is passed.
OK.

> Encoding to 'utf-8' or the default file system encoding doesn't seem right (as the
> characters end up getting stored in the gzip archive itself).
I don’t understand.

> Additionally, encoding as 'utf-8' would cause the file to be created with a utf-8 filename,
> which would be undesirable.
Why?

> So in the current repo, I've created a check to convert the filename to ASCII. If it can be
> converted to ASCII, it is converted and passed through to tarfile. This should address the
> majority of users who have thus encountered this issue. For those who wish to use non-ascii
> characters in project names or versions, one will have to use Python 3 or wait until #13639
> is fixed.
The problem is that even in the latest PEP (345), the characters allowed in a project name are under-specified.  I don’t know if restricting to ASCII-only is acceptable.

> Please review the enclosed patch.
I will.

> Since one test fails (and is known to fail), should it omitted? Can it remain but be marked as
> "expected to fail"?
Is it the test with non-ASCII characters?  If there’s hope to fix it later, you can include it and mark it @unittest.expectedFailure.
History
Date User Action Args
2011-12-21 17:10:45eric.araujosetrecipients: + eric.araujo, jaraco, lars.gustaebel, vstinner, tarek, RonnyPfannschmidt, alexis, mu_mind, mikehoy, jens
2011-12-21 17:10:45eric.araujosetmessageid: <1324487445.4.0.794595123843.issue11638@psf.upfronthosting.co.za>
2011-12-21 17:10:44eric.araujolinkissue11638 messages
2011-12-21 17:10:44eric.araujocreate