[issue4211] frozen packages set an improper __path__ value
Brett Cannon
report at bugs.python.org
Tue Oct 28 00:54:50 CET 2008
Brett Cannon <brett at python.org> added the comment:
Looking at Python/import.c:find_module, fixing this will require
changing the setting of __path__ for frozen packages and how frozen
modules are found. The former will require changing
PyImport_ImportFrozenModule() to use a list instead of a string for the
packages.
To make the change work for find frozen modules, find_module() will need
to change. Basically the special-casing for 'path' around frozen module
just needs to go. This will lead to a slight performance penalty as all
imports will require checking for an equivalent frozen module, but since
it is a strcmp in a loop it should not be too bad.
The performance cost can go away if some strapping young lad happens to
re-implement import in such a way that the frozen module parts can
easily be left out. =)
Setting as a release blocker for now in case Barry is willing to let
this go into 3.0rc4.
----------
assignee: -> brett.cannon
priority: -> release blocker
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4211>
_______________________________________
More information about the Python-bugs-list
mailing list