Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Open
Description
Bug report
Checklist
- I am confident this is a bug in CPython, not a bug in a third-party project
- I have searched theCPython issue tracker,
and am confident this bug has not been reported before
CPython versions tested on:
3.8, 3.9, 3.11
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
No response
A clear and concise description of the bug:
This simple example fully describe this bug
fromzipfileimportZipFilewithZipFile("archive.zip","w")asarchive:archive.comment=b"PK\005\006"+b"\000"*18# Archive has a commentwitharchive.open("file1","w")asfile:# -\file.write(b"content")# |# |witharchive.open("file2","w")asfile:# |file.write(b"content")# |- 3 files# |witharchive.open("file3","w")asfile:# |file.write(b"content")# -/withZipFile("archive.zip")asarchive:assertarchive.comment==b"PK\005\006"+b"\000"*18# Error - archie has no commentassertlen(archive.filelist)==3# Error - archive has no files
Metadata
Metadata
Assignees
Projects
Status
No status