mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-95463: Remove backwards incompatible change regarding the _MASK_UTF_FILENAME flags in bpo-28080 (GH-96072)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 9d066e2aa6
)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
bb37d29576
commit
7a84ce5c44
2 changed files with 3 additions and 1 deletions
|
@ -480,7 +480,7 @@ class ZipInfo (object):
|
||||||
|
|
||||||
def _encodeFilenameFlags(self):
|
def _encodeFilenameFlags(self):
|
||||||
try:
|
try:
|
||||||
return self.filename.encode('ascii'), self.flag_bits & ~_MASK_UTF_FILENAME
|
return self.filename.encode('ascii'), self.flag_bits
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
return self.filename.encode('utf-8'), self.flag_bits | _MASK_UTF_FILENAME
|
return self.filename.encode('utf-8'), self.flag_bits | _MASK_UTF_FILENAME
|
||||||
|
|
||||||
|
|
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue