[Distutils] [setuptools] Bug in setuptools ImpLoader
Jeremy Kloth
jeremy.kloth at 4suite.org
Fri Sep 8 20:24:30 CEST 2006
From PEP 302:
The load_module() method has a few responsibilities that it must
fulfill *before* it runs any code:
- If there is an existing module object named 'fullname' in
sys.modules, the loader *must* use that existing module.
(Otherwise, the reload() builtin will not work correctly.)
If a module named 'fullname' does not exist in sys.modules,
the loader must create a new module object and add it to
sys.modules.
(emphasis on must)
The current implementation always reloads the module if it exists. This
problem exists in both the 0.6 and 0.7 series. Since pkgutil is in Python
2.5, this is an issue there as well.
--
Jeremy Kloth
http://4suite.org/
More information about the Distutils-SIG
mailing list