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 2010-12-27.02:05:45
SpamBayes Score 1.3046609e-09
Marked as misclassified No
Message-id <1293415548.91.0.0358465969488.issue10779@psf.upfronthosting.co.za>
In-reply-to
Content
PyErr_WarnExplicit() expects a filename encoded to UTF-8. This function is only called twice in the Python interpreter: compiler_assert() (with "assertion is always true, perhaps remove parentheses?") and symtable_warn() (eg. with "name 'xxx' is assigned to before global declaration"), and both functions pass a filename encoded to the filesystem encoding.

PyErr_WarnExplicit() should use the filesystem encoding instead of UTF-8 to decode the filename. I already did the same change in issue #9713 and #10114 (r85569).

Attached patch fixes this issue.

See also issue #10778 (decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding).
History
Date User Action Args
2010-12-27 02:05:48vstinnersetrecipients: + vstinner
2010-12-27 02:05:48vstinnersetmessageid: <1293415548.91.0.0358465969488.issue10779@psf.upfronthosting.co.za>
2010-12-27 02:05:46vstinnerlinkissue10779 messages
2010-12-27 02:05:45vstinnercreate