[Python-Dev] Should there be a way or API for retrieving from a code object a loader method and package file where the code comes from?

Phillip J. Eby pje at telecommunity.com
Tue Dec 23 17:29:22 CET 2008

At 04:00 PM 12/23/2008 +0000, Paul Moore wrote:
>PPS Seriously, setuptools and the adoptions of eggs has pushed a lot
>of code to be much more careful about unwarranted assumptions that
>code lives in the filesystem. That's an incredibly good thing, and
>very hard to do right (witness the setuptools "zip_safe" parameter
>which acts as a get-out clause). Much kudos to setuptools for getting
>as far as it has.

And ironically, if I ever get the time to actually work on a new 
version of easy_install (as opposed to perpetually tweaking the old 
one), the default zipping and default sys.path munging will be among 
the first things to go.  ;-)

Ironically, my choice of isolated directories and zipfiles for 
quick-and-dirty uninstall support has ended up costing far too much, 
compared to if I'd just taken the time to design a decent uninstall 
feature.  Of course, hindsight is 20-20; in order to fully understand 
the requirements of a problem, you sometimes have to get a rather 
long way towards solving it the simple, obvious...  and wrong way.

(And, it didn't help that I had significant time constraints pushing 
me in the direction of the Seemingly-Simplest-At-The-Moment Thing 
That Could Possibly Work.)

More information about the Python-Dev mailing list