• Gregory P. Smith's avatar
    Issue #19081: Remove the zipimporter.files reference as the zip TOC · 027ab390
    Gregory P. Smith authored
    caches are module global in the zip_directory_cache. When it is
    updated due to a changed zip file, all zipimporter instances need to
    see the same updates TOC cache.  This fixes the bug for the overlooked
    submodule import case from the earlier round of changes.  Includes
    tests that would fail otherwise.
    
    It also refactors zipimporter_init in the process to make it a bit
    easier to read and understand.  Less reuse of the same variable for
    multiple purposes and the local path buffer is malloc'ed instead
    of consuming a large MAXPATHLEN+2 chunk stack space.
    027ab390
test_zipimport.py 23.3 KB