]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-95463: Remove backwards incompatible change regarding the _MASK_UTF_FILENAME flags...
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Thu, 18 Aug 2022 23:45:55 +0000 (00:45 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Aug 2022 23:45:55 +0000 (16:45 -0700)
Automerge-Triggered-By: GH:pablogsal
Lib/zipfile.py
Misc/NEWS.d/next/Library/2022-08-18-14-53-53.gh-issue-95463.GpP05c.rst [new file with mode: 0644]

index 981560082cab7af572dc71c2e853a88b329f7244..903d09dc023e69ef89c8452b4ab25f062ce5a8f1 100644 (file)
@@ -480,7 +480,7 @@ class ZipInfo (object):
 
     def _encodeFilenameFlags(self):
         try:
-            return self.filename.encode('ascii'), self.flag_bits & ~_MASK_UTF_FILENAME
+            return self.filename.encode('ascii'), self.flag_bits
         except UnicodeEncodeError:
             return self.filename.encode('utf-8'), self.flag_bits | _MASK_UTF_FILENAME
 
diff --git a/Misc/NEWS.d/next/Library/2022-08-18-14-53-53.gh-issue-95463.GpP05c.rst b/Misc/NEWS.d/next/Library/2022-08-18-14-53-53.gh-issue-95463.GpP05c.rst
new file mode 100644 (file)
index 0000000..553c554
--- /dev/null
@@ -0,0 +1,2 @@
+Remove an incompatible change from :issue:`28080` that caused a regression
+that ignored the utf8 in ``ZipInfo.flag_bits``. Patch by Pablo Galindo.