We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e926a95 commit ee3b753Copy full SHA for ee3b753
1 file changed
Lib/test/test_zipfile/test_core.py
@@ -1366,7 +1366,15 @@ class ComparableZipInfo:
1366
keys = [i for i in zipfile.ZipInfo.__slots__ if not i.startswith('_')]
1367
1368
def __new__(cls, zinfo):
1369
- return {i: getattr(zinfo, i) for i in cls.keys}
+ attrs = {i: getattr(zinfo, i) for i in cls.keys}
1370
+
1371
+ # Since patch gh-84353, the _MASK_UTF_FILENAME (0x800) bit may be
1372
+ # changed when writing to the end record depending on whether filename
1373
+ # can be encoded with ascii or cp437. Skip checking this bit by
1374
+ # pretending it's always set.
1375
+ attrs['flag_bits'] |= 0x800
1376
1377
+ return attrs
1378
1379
_struct_pack = struct.pack
1380
0 commit comments