diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2022-08-18 23:45:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 23:45:55 (GMT) |
commit | 9d066e2aa621125cd141b14df79955d74b7f258e (patch) | |
tree | d0140fabe3a8081802dcb5f57208072390f8f9d1 | |
parent | ba4bb7e4649be99d5d6b4151a1bd2eac89ef97f2 (diff) | |
download | cpython-9d066e2aa621125cd141b14df79955d74b7f258e.zip cpython-9d066e2aa621125cd141b14df79955d74b7f258e.tar.gz cpython-9d066e2aa621125cd141b14df79955d74b7f258e.tar.bz2 |
gh-95463: Remove backwards incompatible change regarding the _MASK_UTF_FILENAME flags in bpo-28080 (GH-96072)
Automerge-Triggered-By: GH:pablogsal
-rw-r--r-- | Lib/zipfile.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-08-18-14-53-53.gh-issue-95463.GpP05c.rst | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 9815600..903d09d 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -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 index 0000000..553c554 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-08-18-14-53-53.gh-issue-95463.GpP05c.rst @@ -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. |