[Python-3000] Changing the import machinery

Fredrik Lundh fredrik at pythonware.com
Thu Apr 20 16:52:26 CEST 2006


Guido van Rossum wrote:

> On 4/20/06, in python-dev, Fredrik Lundh <fredrik at pythonware.com> wrote:
> > I was hoping that for Python 3.0, we could get around to unkludge the
> > sys.path/meta_path/path_hooks/path_importer_cache big ball of hacks,
> > possibly by replacing sys.path with something a bit more intelligent than
> > a plain list.
>
> That's an excellent idea. Are there any volunteers here to help out?
> Even just listing specific use cases / scenarios that are currently
> difficult to solve right would be tremendously helpful. (I think that
> Phillip's and others' experience with setuptools might be very
> useful.)

how far would a plain

    the path can contain either directory names or import handlers

modification take us ?  (where import handlers are duck-typed objects
with an as-small-as-possible interface, and the handler for builtins and
frozen objects are included in the list).


being able to track modifications to sys.path would also be useful, I think.
tracking *modifications* are of course not much of a problem, but what
about

    sys.path = list(stuff)

time to add support for module properties, perhaps ?

</F>





More information about the Python-3000 mailing list