[issue992389] attribute error after non-from import

2010-11-19 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue992389] attribute error after non-from import

2010-08-19 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue992389] attribute error after non-from import

2010-08-19 Thread Mark Lawrence
Changes by Mark Lawrence : -- versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue992389] attribute error after non-from import

2009-08-31 Thread Adam Olsen
Adam Olsen added the comment: It'd probably be sufficient if we raised "NameError: lazy import 'foo' not yet complete". That should require a set of what names this module is lazy importing, which is checked in the failure paths of module attribute lookup and global/builtin lookup. --

[issue992389] attribute error after non-from import

2009-08-31 Thread Brett Cannon
Brett Cannon added the comment: I have done a lazy importer like you describe, Adam, and it does help solve this issue. And it does have the problem of import errors being triggered rather late and in an odd spot. -- ___ Python tracker

[issue992389] attribute error after non-from import

2009-08-31 Thread Adam Olsen
Adam Olsen added the comment: The key distinction between this and a "bad" circular import is that this is lazy. You may list the import at the top of your module, but you never touch it until after you've finished importing yourself (and they feel the same about you.) An ugly fix could be don

[issue992389] attribute error after non-from import

2009-04-01 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: brett.cannon -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue992389] attribute error after non-from import

2009-04-01 Thread Nick Coghlan
Nick Coghlan added the comment: No argument from me that my suggestion is a mere glimmering of an idea, rather than a fully worked out definitely viable solution. It was just an angle of attack I hadn't seen suggested before, so I figured it was worth mentioning - the fact that a module is allo

[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sorely tempted to apply the Van Lindberg clause to the last two responses by Torsten and Nick. If there was an easy solution it wouldn't have been open for five years. If you don't believe me, post a fix. I'll even accept a fix for the importlib package

[issue992389] attribute error after non-from import

2009-03-31 Thread Nick Coghlan
Nick Coghlan added the comment: I just had a thought: we may be able to eliminate this behaviour without mucking about in the package globals. What if the import semantics were adjusted so that, as a last gasp effort before bailing out with an ImportError, the import process checked sys.modules

[issue992389] attribute error after non-from import

2009-03-31 Thread Torsten Bronger
Torsten Bronger added the comment: Maybe it's better to leave it open, waiting for someone to pick it up, even if this is some time in the future? In my opinion, this is suprising behaviour without an actual rationale, and a current implementation feature. I'd be a pitty for me to see it becom

[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, never mind about the importlib bug, that was my mistake. importlib actually behaves exactly the same way as the built-in import. I conclude that this is probably the best semantics of import that we can hope for in this corner case. I propose to close

[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Good sleuthing Nick! It's clearly the same bug that Fredrik found. I tried to test if using Brett' importlib has the same problem, but it can import neither p.a nor p.b, so that's not helpful as to sorting out the import semantics. I believe that at some po

[issue992389] attribute error after non-from import

2009-03-31 Thread Nick Coghlan
Nick Coghlan added the comment: This came up on python-dev again recently: http://mail.python.org/pipermail/python-dev/2009-March/087955.html -- ___ Python tracker ___

[issue992389] attribute error after non-from import

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- assignee: -> brett.cannon nosy: +brett.cannon versions: +Python 2.7, Python 3.1 -Python 2.3 ___ Python tracker ___

[issue992389] attribute error after non-from import

2008-04-13 Thread Torsten Bronger
Torsten Bronger <[EMAIL PROTECTED]> added the comment: I dare to make a follow-up although I have no idea at all about the internal processes in the Python interpreter. But I've experimented with circular imports a lot recently. Just two points: First, I think that circular imports don't neces

[issue992389] attribute error after non-from import

2008-04-12 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: This is actually a pretty tough problem - fixing it would involve some fairly subtle changes to the way imports from packages are handled. Given that I'm of the opinion that permitting circular imports in a code base is an extraordinarily bad co

[issue992389] attribute error after non-from import

2008-04-12 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- assignee: -> ncoghlan priority: low -> normal Tracker <[EMAIL PROTECTED]> ___ Pytho

[issue992389] attribute error after non-from import

2008-04-10 Thread Torsten Bronger
Torsten Bronger <[EMAIL PROTECTED]> added the comment: I have a very similar issue (maybe the same?) at the moment. Assume the follwing package structure: main.py package/ __init__.py [empty] moduleX.py moduleY.py main.py says: from package import moduleX moduleX.py says:

[issue992389] attribute error after non-from import

2008-04-08 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: I think the lowered priority got lost somewhere along the line. -- priority: normal -> low Tracker <[EMAIL PROTECTED]> _