Author benjamin.peterson
Recipients amaury.forgeotdarc, benjamin.peterson, brett.cannon, sjmachin, vstinner
Date 2009-02-23.01:40:57
SpamBayes Score 1.22297e-12
Marked as misclassified No
Message-id <1afaf6160902221740y46894a4k5a93f5f9bd11917b@mail.gmail.com>
In-reply-to <1234916532.04.0.583926935935.issue4626@psf.upfronthosting.co.za>
Content
On Tue, Feb 17, 2009 at 6:22 PM, STINNER Victor <report@bugs.python.org> wrote:
> I don't understand the change in source_as_string(). Except of that,
> it looks correct.

Py_CFFLAGS_SOURCE_IS_UTF8 is already set in compile().

>
>> The one problem is that it causes test_coding to fail because
>> coding cookies are ignored and not checked to see if they
>> are the same as the encoding of the file.
>
> The test have to fail, but the error is not the the compile() patch,
> but in the test. Input file is opened as unicode instead of bytes. A
> propose this patch to fix the test:

That fix is correct, but I think it avoids what the test is meant to
test. The test is supposed to check that compile() complains if the
encoding of the unicode string is wrong compared to the coding cookie,
but I think that feature is ok to not support.
History
Date User Action Args
2009-02-23 01:41:01benjamin.petersonsetrecipients: + benjamin.peterson, brett.cannon, sjmachin, amaury.forgeotdarc, vstinner
2009-02-23 01:40:59benjamin.petersonlinkissue4626 messages
2009-02-23 01:40:57benjamin.petersoncreate