[New-bugs-announce] [issue7459] Magic word incorrect in Python 3

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Tue Dec 8 17:43:41 CET 2009


New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>:

Python/import.c defines magic word which is used in the beginning of
.pyc files to verify if .pyc files have been generated by compatible
version of Python.

Python 2 supports undocumented -U option increases magic word by 1.
Python 3 uses unicode strings by default and doesn't support -U option,
but seemingly incorrect change was committed in r55013, which causes
that magic word is always increased by 1 in Python 3 in contrary to
documentation, which says that it could only happen with some command
line options.

This problem cannot be fixed in Python 3.1.2 for compatibility with
e.g. 3.1.1, but it can be fixed in 3.2. Additionally documentation in
3.1.2 can be fixed.

----------
components: Interpreter Core
files: python-3.2-fix_magic_word.patch
keywords: patch
messages: 96138
nosy: Arfrever, gvanrossum
severity: normal
status: open
title: Magic word incorrect in Python 3
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15498/python-3.2-fix_magic_word.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7459>
_______________________________________


More information about the New-bugs-announce mailing list