This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erik.bray
Recipients erik.bray
Date 2018-10-05.10:06:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za>
In-reply-to
Content
Not that there is any great reason to write a zip file to /dev/null, but I had some code that happened to do so which worked on Python 2.7, but at some point this broke:

Python 3.8.0a0 (heads/master:fc7d1b3, Oct  5 2018, 09:49:57)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipfile
>>> f = zipfile.ZipFile('/dev/null', 'w')
>>> f.writestr('foo.txt', 'testtesttesttesttest')
>>> f.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/embray/src/python/cpython/Lib/zipfile.py", line 1813, in close
    self._write_end_record()
  File "/home/embray/src/python/cpython/Lib/zipfile.py", line 1914, in _write_end_record
    endrec = struct.pack(structEndArchive, stringEndArchive,
struct.error: argument out of range
History
Date User Action Args
2018-10-05 10:06:44erik.braysetrecipients: + erik.bray
2018-10-05 10:06:44erik.braysetmessageid: <1538734004.78.0.545547206417.issue34904@psf.upfronthosting.co.za>
2018-10-05 10:06:44erik.braylinkissue34904 messages
2018-10-05 10:06:44erik.braycreate