[issue11374] pkgutil.extend_path do not recognize py{c,o} file
Éric Araujo
report at bugs.python.org
Tue Nov 29 13:50:45 CET 2011
Éric Araujo <merwok at netwok.org> added the comment:
.pyo files are used if sys.dont_write_bytecode is false and sys.flags.optimize is >= 1 (IOW, true).
For Python 3.2 and 3.3, imp.cache_from_source should be used to get the right paths (see PEP 3147).
Before you put more work into this, it would be nice to get confirmation from one import expert that the bug is valid: I know the import system only superficially, and I’m not sure that package/__init__.pyc / .pyo is supported by import (if not, then pkgutil should also not support it).
----------
nosy: +barry, ncoghlan, pje
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11374>
_______________________________________
More information about the Python-bugs-list
mailing list