Skip to content

Commit

Permalink
pythongh-95463: Remove backwards incompatible change regarding the _M…
Browse files Browse the repository at this point in the history
…ASK_UTF_FILENAME flags in bpo-28080 (pythonGH-96072)

Automerge-Triggered-By: GH:pablogsal
  • Loading branch information
pablogsal authored Aug 18, 2022
1 parent ba4bb7e commit 9d066e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/zipfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def FileHeader(self, zip64=None):

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

Expand Down
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 9d066e2

Please sign in to comment.