New submission from Jörn Heissler <[email protected]>:
When running this code:
from zipfile import ZipFile
import io
def foo():
pass
data = io.BytesIO()
zf = ZipFile(data, "w")
I get this message:
Exception ignored in: <function ZipFile.__del__ at 0x7f9005caa160>
Traceback (most recent call last):
File "/home/user/git/oss/cpython/Lib/zipfile.py", line 1800, in __del__
File "/home/user/git/oss/cpython/Lib/zipfile.py", line 1817, in close
ValueError: I/O operation on closed file.
Comment out def foo: pass, and there is no error.
It looks like the bug was introduced with commit
ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8 (bpo-32388).
----------
messages: 349104
nosy: joernheissler, pitrou
priority: normal
severity: normal
status: open
title: ValueError: I/O operation on closed file. in ZipFile destructor
type: crash
versions: Python 3.8, Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37773>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com