[Python-Dev] Another approach for the import mechanism

Martin v. Löwis martin@v.loewis.de
06 Dec 2002 12:18:10 +0100


"Moore, Paul" <Paul.Moore@atosorigin.com> writes:

>    (Actually, I think that Just's mechanism has sufficient extra
>    functionality over PEP 273, that it deserves a PEP even now.
>    But if Just takes time out to write a PEP, I suspect that
>    makes it even less likely we'll get working code in time...)

Indeed. It appears that, if Just completes the patch, we need BDFL
pronouncement, anyway, to chose one of the following options:

- Apply Jim's patch: Ugly, unreadable code, but provides strictly
  PEP 273 only, and preserves backwards compatibility.

- Apply Just's patch: Nice code, probably provides PEP 273, might
  break compatibility, does not provide all features it claims to
  provide (you can't implement a .py.bz2 importer with it).

- Wait for YAGNI (yet another great new infrastructure), to invoke all
  hooks on all sys.path items; this would give backwards compatibility
  (sys.path could continue to be a list of strings), extensibility
  (you could add new strings to sys.path, yet the hooks would honor
  them), feature-richness (you can implement a .py.bz2 importer),
  and slowness (for invoking every hook on every sys.path item).

Regards,
Martin