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 brett.cannon
Recipients Trundle, alex, benjamin.peterson, brett.cannon, eric.araujo, eric.snow, ncoghlan, pitrou, vstinner
Date 2012-03-09.23:07:42
SpamBayes Score 2.1344628e-09
Marked as misclassified No
Message-id <1331334463.77.0.715911366447.issue2377@psf.upfronthosting.co.za>
In-reply-to
Content
Two things I realized yesterday that need to be implemented (and some double-checking and/or opinion would be nice) while I wait for a full patch review.

One is ``python -v`` support. sys.flags has a verbose attribute that can be used to properly guard printing imported modules. It might be tricky, though, if sys.stderr is not set up properly during very early imports. I guess at worst I expose some sprintf() in imp just for this case (ugh).

Two is getting __import__() for situations where another import is triggered (e.g. fromlist stuff). I think the proper semantics is ``globals['__builtins__']['__import__'] if '__builtins__' in globals else  builtins.__import__``. Now where this gets tricky is that doing this means importlib.__import__(), when used directly from the importlib module, would sometimes use its implementation, and in other cases use builtins.__import__(). So either importlib.__import__() gets forked from builtins.__import__() so that it always uses importlib internally or simply don't worry about it and just have importlib.__import__() use builtins.__import__() when the need to trigger another import comes up. What do people think should happen?
History
Date User Action Args
2012-03-09 23:07:44brett.cannonsetrecipients: + brett.cannon, ncoghlan, pitrou, vstinner, benjamin.peterson, eric.araujo, alex, Trundle, eric.snow
2012-03-09 23:07:43brett.cannonsetmessageid: <1331334463.77.0.715911366447.issue2377@psf.upfronthosting.co.za>
2012-03-09 23:07:43brett.cannonlinkissue2377 messages
2012-03-09 23:07:42brett.cannoncreate