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 jwilk
Recipients jwilk
Date 2008-01-21.10:51:49
SpamBayes Score 0.03551415
Marked as misclassified No
Message-id <1200912712.61.0.875613384462.issue1882@psf.upfronthosting.co.za>
In-reply-to
Content
PEP 0263 allows an encoding declaration in the second line, but
py_compile seems not to recognize such ones:

>>> MODULE = "\n# encoding=UTF-8\nU = u'\xc3\xb3'\n"
>>> f = file('tmp.py', 'w')
>>> f.write(MODULE)
>>> f.close()
>>> from py_compile import compile
>>> compile('tmp.py', 'tmp_buggy.pyc', 'tmp_buggy.py', doraise = True)
>>> import tmp
>>> import tmp_buggy
>>> tmp.U
u'\xf3'
>>> tmp_buggy.U
u'\xc3\xb3'
History
Date User Action Args
2008-01-21 10:51:52jwilksetspambayes_score: 0.0355141 -> 0.03551415
recipients: + jwilk
2008-01-21 10:51:52jwilksetspambayes_score: 0.0355141 -> 0.0355141
messageid: <1200912712.61.0.875613384462.issue1882@psf.upfronthosting.co.za>
2008-01-21 10:51:49jwilklinkissue1882 messages
2008-01-21 10:51:49jwilkcreate