[issue44638] zipfile.ZipFile is closed when zipfile.Path is closed
Jason R. Coombs
report at bugs.python.org
Thu Jul 15 20:55:55 EDT 2021
Jason R. Coombs <jaraco at jaraco.com> added the comment:
This also reproduces the failure:
```
zip_file = zipfile.ZipFile('zipfile.zip')
path = zipfile.Path(zip_file)
name = zip_file.namelist()[0]
del path
zip_file.open(name)
```
Removing `del path` bypasses the issue. Something about the destructor for zipfile.Path is causing the closing of the handle for zip_file.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44638>
_______________________________________
More information about the Python-bugs-list
mailing list