Benjamin Peterson <benja...@python.org> added the comment:

On Tue, Feb 17, 2009 at 6:22 PM, STINNER Victor <rep...@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.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to