[Import-SIG] PEP 382 as an import hook

P.J. Eby pje at telecommunity.com
Mon Jun 27 20:35:12 CEST 2011


At 08:52 PM 6/26/2011 -0600, Eric Snow wrote:
>Would a PEP 302 import hook to implement PEP 382 be too inefficient?
>What about just for testing out the PEP?  Maybe I'm missing something,
>but it seems like it should be doable and would enable PEP 382 for
>2.x.
>
>It would have to:
>
>1. handle adding the find_path and load_module_with_path calls,
>2. handle augmenting importlib's _DefaultPathFinder or an equivalent
>to handle the .pth files.
>
>I'll probably take a stab at writing one up in the next week or two,
>regardless.

If you want it for Python 2.x, take a look at the sketch I linked here:

   http://mail.python.org/pipermail/import-sig/2011-June/000198.html

It'd probably port cleanly to 3.x, too, if that's what you want it for. 



More information about the Import-SIG mailing list