[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-13 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: Thanks Nick for fixing this in a timely manner. BTW I've seen this when trying to run doctests with py.test. ___ Python tracker <[EMAIL PROTECTED]> _

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-13 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Fixed in r64915. The end result is that the import system now only emits a RuntimeWarning instead of raising SystemError if it can't find the parent module when attempting to perform an absolute import (regardless of whether the parent module n

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-07 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Adding to my personal to-do list for next beta. -- assignee: twouters -> ncoghlan ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-07 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Bumped priority - an existing module shouldn't crash in 2.6 just because we started using __package__ as part of the import mechanism and that module happens to already set an attribute by that name. -- priority: -> release blocker __

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-04 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: One idea would be to change the import code to only produce a warning for a missing __package__ entry instead of a SystemError (reserving the SystemError for cases where the package name is derived from __name__ rather than being retrieved from

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-04 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Hmm, setting an invalid value for __package__ will definitely break relative imports (see PEP 361), but it probably shouldn't be breaking absolute imports. -- nosy: +ncoghlan ___ Python tracker <[EMA

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-06-27 Thread Ralf Schmitt
New submission from Ralf Schmitt <[EMAIL PROTECTED]>: The following short program work in python 2.5, but does die with a SystemError in python2.6: ~/ cat t.py #! /usr/bin/env python res = dict(__package__='foo') exec "from os import path" in res ~/ python2.5 t.py ~/ python2.6 t.py Traceback

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-06-27 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- assignee: -> twouters nosy: +twouters ___ Python tracker <[EMAIL PROTECTED]> ___ _