You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pkgutil direct use of zipimport._zip_directory_cache is no longer safe #121342
since #103208 , this is no longer safe, because that made zipimport no longer always refresh the cache on invalidation. I think that if the cache has been invalidated but not accessed 'normally' since then, this direct access attempt can cause a crash as it doesn't trigger a refresh:
E KeyError: '/tmp/dask-scratch-space/scheduler-belyj1dp/myfile.zip'
I observed this in the test suite for dask-distributed - see dask/distributed#8708 - but it seems like a general issue, and @desmondcheongzx asked me to file an issue, so here it is. That test suite hits it in a test that runs async and creates archives under the same name repeatedly, but there are probably other ways to hit this, I guess.
Activity
pythongh-121342: Fixed `pkgutil.iter_zipimport_modules` on an invalid…
pythongh-121342: Fixed `pkgutil.iter_zipimport_modules` on an invalid…
pythongh-121342: Fixed `pkgutil.iter_zipimport_modules` on an invalid…
pythongh-121342: Fixed `pkgutil.iter_zipimport_modules` on an invalid…
pythongh-121342: Fixed `pkgutil.iter_zipimport_modules` on an invalid…
pythongh-121342: Unreferenced `pkgutil.iter_zipimport_modules` in NEWS.d
pythongh-121342: Make the Sphinx linter happy again