New submission from Jakub Wilk: 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' ---------- components: Library (Lib) messages: 61384 nosy: jwilk severity: major status: open title: py_compile does not follow PEP 0263 type: behavior versions: Python 2.4, Python 2.5 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1882> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com