[Python-Dev] imputil and modulefinder replacements

Gordon McMillan gmcm@hypernet.com
Fri, 5 Oct 2001 09:25:39 -0400


[Gordon]
> > The entire subject seems to have dropped off radar, after
> > starting out as highly controversial (the Import-SIG was
> > started so the ihooks-partisans could hash it out with the
> > imputil- partisans). Import hacks are more common than ever,
> > but they're all home-grown now.

[Thomas]
> You thought of replacing the import hacks by custom import
> policies implemented with imputil or iu4? No chance, IMO.

That's what ihooks was written for, and nobody ever used it, 
either.
 
> Several reasons I can think of:
> - Import hacks have this cool touch...

Ironically, they usually are justified as "making it easier on the 
user" (where they really mean programmer). Which is crap, 
because when the programmer has trouble with X.A.fribble(), 
he goes looking for the source. But there is no X/A.py.

> - Import hacks start out to help the developers, but they never
> get cleaned up for the poor user (pmw being an exception!)

And they help constrain Python to being a developer-only 
language.

The existing import mechanism is poorly understood (just see 
how many wrong answers an import question on c.l.py gets) 
and home to some major warts (such as the fact that relative 
and absolute imports are spelled the same way). Greg wrote 
imputil as a first step towards fixing those kinds of problems.

under-the-spreading-entropy-ly y'rs

- Gordon