[Python-Dev] python-dev sprint at PyCon

Phillip J. Eby pje at telecommunity.com
Tue Nov 1 19:28:12 CET 2005

At 11:14 AM 11/1/2005 -0700, Guido van Rossum wrote:
>I guess this ought to be recorded. :-(
>The issue has been beaten to death and my position remains firm:
>rather than playing namespace games, consistent renaming is the right
>thing to do here. This becomes a trivial source edit,

Well, it's not trivial if you're (in my case) trying to support 2.3 and 2.4 
with the same code base.

It'd be nice to have some other advice to offer people besides, "go edit 
your code".  Of course, if the feature hadn't already existed, I suppose a 
PEP to add it would have been shot down, so it's a reasonable decision.

>which beats the
>problems of debugging things when it doesn't work out as expected
>(which is very common due to the endless subtleties of loading
>multiple versions of the same code).

Yeah, Bob Ippolito and I batted around a few ideas about how to implement 
simultaneous multi-version imports for Python Eggs, some of which relied on 
the relative/absolute ambiguity, but I think the main subtleties have to do 
with dynamic imports (including pickling) and the use of __name__.

Of course, since we never actually implemented it, I don't know what other 
subtleties could potentially exist.  Python Eggs currently allow you to 
install multiple versions of a package, but at runtime you can only import 
one of them, and you get a runtime VersionConflict exception if two eggs' 
version criteria are incompatible.

More information about the Python-Dev mailing list