BoppreH added the comment:
I'm not sure this is a duplicate of issue29094. That issue includes random data
at the start of the file, while this issue uses the 'ab' mode solely for a
creating the file if it doesn't exist (and thus is either empty or already a
valid zip f
New submission from BoppreH:
I may be misunderstanding file modes or the `zipfile` library, but
from zipfile import ZipFile
ZipFile(open('a.zip', 'ab'), 'a').writestr('f.txt', 'z')
unexpectedly creates an invalid zip file. 7zip is able