[issue1346572] Remove inconsistent behavior between import and zipimport
Éric Araujo
report at bugs.python.org
Fri Mar 2 06:54:09 CET 2012
Éric Araujo <merwok at netwok.org> added the comment:
> Does "compileall" generate both .pyc and .pyo by default?
python3 -m compileall generates pyc, python3 -O -m compileall pyo. Functions in py_compile and compileall gained an optimize argument in 3.2.
> does pysetup handle that for you?
You’ll have to be more specific. Bytecode files can be created when building a bdist or on install from source. Packaging commands do not depend on the calling Python’s -O option, they have their own options to let users specify if they want pyc files, pyo, neither or both.
> MvL is correct that zipimport should ignore .pyo files when __debug__ is set and vice-versa, but the
> precompilation tools should also take care of generating both versions by default.
Really? The behaviors of compileall and packaging seems better to me.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1346572>
_______________________________________
More information about the Python-bugs-list
mailing list