[Python-Dev] Import redesign [LONG]
Guido van Rossum
guido@CNRI.Reston.VA.US
Fri, 03 Dec 1999 09:39:25 -0500
Greg,
Great response. I think we know where we each stand. Please go ahead
with a new design. (That's trust, not carte blanche.)
Just one thought: the more I think about it, the less I like
sys.importers: functionality which is implemented through
sys.importers must necessarily be placed either in front of all of
sys.path or after it. While this is helpful for "canned" apps that
want *everything* to be imported from a fixed archive, I think that
for regular Python installations sys.path should remain the point of
attack. In particular, installing a new package (e.g. PIL) should
affect sys.path, regardless of the way of delivery of the modules
(shared libs, .py files, .pyc files, or a zip archive).
I'm not too worried about code that inspects sys.path and expects
certain invariants; that code is most likely interfering with the
import mechanism so should be revisited anyway.
On the lone .pyc issue: I'd like to see this disappear when using the
filesystem, I see no use for it there if we support .pyc files in zip
archives.
--Guido van Rossum (home page: http://www.python.org/~guido/)