[issue44638] zipfile.ZipFile is closed when zipfile.Path is closed
Jason R. Coombs
report at bugs.python.org
Thu Jul 15 20:39:26 EDT 2021
Jason R. Coombs <jaraco at jaraco.com> added the comment:
Here's a much simpler repro that avoids the class construction but triggers the same error:
```
import zipfile
zip_file = zipfile.ZipFile('zipfile.zip')
names = [each.name for each in zipfile.Path(zip_file).iterdir()]
with zip_file.open(names[0]) as file:
print(file.read())
```
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44638>
_______________________________________
More information about the Python-bugs-list
mailing list