[issue992389] attribute error due to circular import

2014-11-13 Thread Nick Coghlan
Changes by Nick Coghlan : -- superseder: -> Modify IMPORT_FROM to fallback on sys.modules ___ Python tracker ___ ___ Python-bugs-lis

[issue992389] attribute error due to circular import

2014-11-13 Thread Nick Coghlan
Nick Coghlan added the comment: Belatedly agreeing with PJE on this one. If concerns around circular imports continue to be raised in a post Python 3.5 world (with the issue 17636 change), then we can look at revisiting this again, but in the meantime, lets just go with the sys.modules fallbac

[issue992389] attribute error due to circular import

2013-12-17 Thread PJ Eby
PJ Eby added the comment: The new patch will have weird results in the case of a parent module that defines an attribute that's later replaced by an import, e.g. if foo/__init__.py defines a variable 'bar' that's a proxy for the foo.bar module. This is especially problematic if this proxy is

[issue992389] attribute error due to circular import

2013-12-17 Thread Nick Coghlan
Nick Coghlan added the comment: I'm reopening this, since PEP 451 opens up new options for dealing with it (at least for loaders that export the PEP 451 APIs rather than only the legacy loader API, which now includes all the standard loaders other than the ones for builtins and extension modul

[issue992389] attribute error due to circular import

2013-04-14 Thread Nick Coghlan
Nick Coghlan added the comment: The implementation of issue #17636 (making IMPORT_FROM fall back to sys.modules when appropriate) will make "import x.y" and "from x import y" equivalent for resolution purposes during import. That covers off the subset of circular references that we want to all

[issue992389] attribute error due to circular import

2012-11-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: In Torsten's example from . import moduleX can be replaced with moduleX = importlib.import_module('.moduleX', __package__) (*) or moduleX = importlib.import_module('package.moduleX') If that is not pretty enough then perhaps the new syn

[issue992389] attribute error due to circular import

2012-03-07 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue992389] attribute error due to circular import

2011-10-19 Thread Florent Xicluna
Changes by Florent Xicluna : -- stage: -> needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list

[issue992389] attribute error due to circular import

2011-10-16 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue992389] attribute error due to circular import

2011-10-15 Thread Nick Coghlan
Nick Coghlan added the comment: Changed the issue title to state clearly that the core issue is with circular imports that attempt to reference module contents at import time, regardless of the syntactic form used. All of the following module level code can fail due to this problem: from