[Python-Dev] New relative import issue
greg.ewing at canterbury.ac.nz
Fri Sep 22 01:37:37 CEST 2006
Guido van Rossum wrote:
> Eek? If there are two third-party top-level packages A and B, by
> different third parties, and A depends on B, how should A find B if
> not via sys.path or something that is sufficiently equivalent as to
> have the same problems?
Some kind of configuration mechanism is needed, but
I don't see why it can't be a static, declarative one
rather than computed at run time.
Whoever installs package A should be responsible for
setting up whatever environment is necessary around it
for it to find package B and anything else it directly
The program C which uses package A needs to be told
where to find it. But C doesn't need to know where to
find B, the dependency on which is an implementation
detail of A, because A already knows where to find it.
In the Eiffel world, there's a thing called and ACE
(Assembly of Classes in Eiffel), which is a kind of
meta-language for describing the shape of the class
namespace, and it allows each source file to have its
own unique view of that namespace. I'm groping towards
something equivalent for the Python module namespace.
(AMP - Assembly of Modules in Python?)
More information about the Python-Dev