This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Jimbofbx, ncoghlan
Date 2012-09-25.05:47:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348552054.16.0.238914959847.issue16031@psf.upfronthosting.co.za>
In-reply-to
Content
There is no magic bullet, but there are a whole mess of backwards compatibility constraints.

Closing this as a duplicate, because there's no clear resolvable RFE here beyond the known issues with circular imports and the differences between lazy and eager imports (already well documented in #992389, although potentially easier to resolve in 3.4 now that we have migrated to importlib).

Much of the rest of the complaint looks like a bug in pydev, as it appears to be running from a string *without creating an appropriate entry in sys.modules* first. Thus it *is* running through test_a twice due to the self import.

Many of these apparent import problems stem from poor reimplementations of import mechanics in tools like pydev and nose violating import system invariants. With importlib being used as the reference import implementation and the language reference finally including formally documented import semantics in 3.3+, this problem should hopefully reduce over time, as these ad hoc reimplementations are replaced by appropriate usage of importlib and runpy.

(Of course, the import system initialisation process is not without problems of its own, as PEP 395 describes)
History
Date User Action Args
2012-09-25 05:47:34ncoghlansetrecipients: + ncoghlan, Jimbofbx
2012-09-25 05:47:34ncoghlansetmessageid: <1348552054.16.0.238914959847.issue16031@psf.upfronthosting.co.za>
2012-09-25 05:47:33ncoghlanlinkissue16031 messages
2012-09-25 05:47:32ncoghlancreate