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 loewis
Recipients ajaksu2, asmodai, eric.araujo, kbk, lemburg, loewis, methane, sgala, vstinner
Date 2010-10-25.06:48:55
SpamBayes Score 3.6382009e-13
Marked as misclassified No
Message-id <1287989338.05.0.315536342922.issue1542677@psf.upfronthosting.co.za>
In-reply-to
Content
For 2.7, I don't think it's possible to really fix this. I see the following options:

A. current status. Byte strings are compiled correctly, Unicode strings are not.
B. compile source as a Unicode string, as proposed in msg85886. Unicode strings are compiled propertly, byte strings are not (they get compiled as UTF-8, when they should get compiled in the locale encoding)
C. prefix source with encoding declaration, as proposed in msg85882. Both Unicode strings and byte strings get compiled correctly, but line numbers in tracebacks are wrong.

Given that it's not possible to fix this without breaking something else, and given that it's fixed in Python 3, I propose to declare this as "won't fix" for Python 2.7.

In any case, the bug is certainly not in compile(), which is behaving exactly as specified, so I revert the title change.
History
Date User Action Args
2010-10-25 06:48:58loewissetrecipients: + loewis, lemburg, kbk, vstinner, sgala, ajaksu2, asmodai, eric.araujo, methane
2010-10-25 06:48:58loewissetmessageid: <1287989338.05.0.315536342922.issue1542677@psf.upfronthosting.co.za>
2010-10-25 06:48:56loewislinkissue1542677 messages
2010-10-25 06:48:55loewiscreate