You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When open a ZIP archive, write a file with non-ascii name in it, and, not closing the archive, read that file back, it fails:
>>> import zipfile
>>> with zipfile.ZipFile('test.zip', 'w') as zf:
... zf.writestr('йцукен', '')
... zf.read('йцукен')
...
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/usr/lib/python3.8/zipfile.py", line 1440, in read
with self.open(name, "r", pwd) as fp:
File "/usr/lib/python3.8/zipfile.py", line 1521, in open
raise BadZipFile(
zipfile.BadZipFile: File name in directory 'йцукен' and header b'\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd' differ.
New changeset d7f37d1 by Miss Islington (bot) in branch '3.8': bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040) d7f37d1
New changeset c916c48 by Miss Islington (bot) in branch '3.9': bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040) c916c48
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: