Message374170
I created a simpler test case that exercises the buggy code. The problem can be reproduced by passing ZipFile.__init__() a file-like object with the write flag (mode "w") and then closing the file-like object before calling ZipFile.close().
The exception being triggered by the call to ZipFile.__del__() is a side-effect because all ZipFile.__del__() does is call ZipFile.close().
import io
from zipfile import ZipFile
bytes_io = io.BytesIO()
zip_file = ZipFile(bytes_io, mode="w")
bytes_io.close()
zip_file.close() # throws ValueError |
|
Date |
User |
Action |
Args |
2020-07-24 10:05:45 | Jeffrey.Kintscher | set | recipients:
+ Jeffrey.Kintscher, jaraco, Nick Henderson |
2020-07-24 10:05:45 | Jeffrey.Kintscher | set | messageid: <1595585145.57.0.818818862354.issue41350@roundup.psfhosted.org> |
2020-07-24 10:05:45 | Jeffrey.Kintscher | link | issue41350 messages |
2020-07-24 10:05:45 | Jeffrey.Kintscher | create | |
|