[issue2751] Regression for executing packages

Nick Coghlan report at bugs.python.org
Sun May 4 06:34:27 CEST 2008


Nick Coghlan <ncoghlan at gmail.com> added the comment:

The ability to execute packages was never intended, since doing so
breaks imports in a variety of subtle ways. It was actually a bug in 2.5
that it was permitted at all, so 2.6 not only disabled it again, but
also added a test to make sure it stays disabled (2.4 correctly rejected
it with an ImportError, just as 2.6 does).

Here's the relevant svn log entry:

r56509 | nick.coghlan | 2007-07-23 23:41:45 +1000 (Mon, 23 Jul 2007) | 5
lines

Correctly cleanup sys.modules after executing runpy relative import
tests
Restore Python 2.4 ImportError when attempting to execute a package
(as imports cannot be guaranteed to work properly if you try it)

----------
resolution:  -> invalid
status: open -> closed

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2751>
__________________________________


More information about the Python-bugs-list mailing list