Pull requests

#34 Declined
Deleted repository
zip_dir_cache (4b981d54c6a1)

zip_dir_cache and win32 tests

  1. philip_thiem

pypy's directory cache in ZipImports stores the file names of the contents of the directory differently from cpython. On unix the result is the same. I patched pkg_resources so that it used zipfile instead to get the contents of eggs. It work for me. With some fixes to filename encodings tests on win32 and expected return values in windows based doc tests, passes all the tests from py25-27 and py31-33. I didn't see any place that eggs were deleted from the directory cache so this patch should effectively remove the use of the that variable.

  • Learn about pull requests

Comments (4)

  1. Jason R. Coombs

    Hi Philip. Thanks for the contrib. Sorry for the delay in reviewing it. It looks like a generally good patch and I just had a couple of questions (inline comments) plus:

    1. Does this fix any filed bugs? If not, what is the failure that this patch corrects?
  2. philip_thiem author

    No problem, it has been a little while since I had thought about this. There is a bug which I think it would close:


    How I came across this, was that on pypy using win32 I couldn't get packages to install properly for doing unit tests for nose2 on win32. Well packages would install but then the installation couldn't be verified and would fail, I think. Turns out that the internal key storage in pypy for the zipimport._zip_directory_cache is actually inconsistent between platforms. I seem to recall trying to work around it for whenever a file was looked up in the cache, but that getting a little hairy, so it seemed cleaner just to query the zip file directly and build a manifest.