[issue4211] frozen packages set an improper __path__ value

Brett Cannon report at bugs.python.org
Fri Oct 31 23:54:16 CET 2008


Brett Cannon <brett at python.org> added the comment:

I have an attached patch that fixes the reported problem.

First, it adds a sanity check that no empty module name is checked for
(crashes the interpreter otherwise).

Second, the __path__ attribute is now a list. This does break
backwards-compatibility and thus cannot be backported to 2.6.

Third, I removed the special-casing of frozen packages and just made
frozen module checks a universal thing. This did change the module
resolution order such that frozen modules are checked before built-in
modules and registered modules under Windows (whatever those are).
Moving frozen modules after those two cases are possible if it's really
desired.

At this point I need a review to get this into 3.0 and a decision on
whether to backport to 2.7 (I say don't bother, out of
backward-compatibility, but it probably wouldn't really hurt anything
either).

----------
assignee: brett.cannon -> 
keywords: +needs review, patch
Added file: http://bugs.python.org/file11920/issue4211.diff

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


More information about the Python-bugs-list mailing list