summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2023-10-14 07:17:47 (GMT)
committerGitHub <noreply@github.com>2023-10-14 07:17:47 (GMT)
commit4110cfec1233139b4e7c63459ba465ab80554e3e (patch)
treed14871ca9cbabe029736107b8005aaa3941273b3 /Lib/zipfile
parente2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d (diff)
downloadcpython-4110cfec1233139b4e7c63459ba465ab80554e3e.zip
cpython-4110cfec1233139b4e7c63459ba465ab80554e3e.tar.gz
cpython-4110cfec1233139b4e7c63459ba465ab80554e3e.tar.bz2
gh-110715: Add missing import in zipfile (gh-110822)
Diffstat (limited to 'Lib/zipfile')
-rw-r--r--Lib/zipfile/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py
index 2c963de..995d267 100644
--- a/Lib/zipfile/__init__.py
+++ b/Lib/zipfile/__init__.py
@@ -545,6 +545,7 @@ class ZipInfo (object):
if up_unicode_name:
self.filename = _sanitize_filename(up_unicode_name)
else:
+ import warnings
warnings.warn("Empty unicode path extra field (0x7075)", stacklevel=2)
except struct.error as e:
raise BadZipFile("Corrupt unicode path extra field (0x7075)") from e