Re: [Distutils] Easy install and zipimporter
At 09:47 PM 11/10/2007 +0100, Maciej Fijalkowski wrote:
Hello,
I've been implementing zipimport module recently for the pypy project and I came to the following problem:
When zipimport is there, easy install is mangling with zipimport._zip_directory_cache, which is a) undocumented in importer protocol b) starts with an _ c) explodes when I compile pypy and import site.py (providing that I've got easy_install installed)
Any propositions what to do here? Just providing _zip_directory_cache is not really an option, since it has no documentation
import zipimport help(zipimport) Help on built-in module zipimport:
NAME zipimport - zipimport provides support for importing Python modules from Zip archives. FILE (built-in) MODULE DOCS http://www.python.org/doc/current/lib/module-zipimport.html DESCRIPTION This module exports three objects: - zipimporter: a class; its constructor takes a path to a Zip archive. - ZipImporterError: exception raised by zipimporter objects. It's a subclass of ImportError, so it can be caught as ImportError, too. - _zip_directory_cache: a dict, mapping archive paths to zip directory info dicts, as used in zipimporter._files.
and no unittests,
Well, the tests in test_zipimport *clear* it.
which means it might change at any moment.
Why? Note, by the way, that as of Python 2.5, the pkgutil module also makes use of this variable.
participants (1)
-
Phillip J. Eby