Skip to content

Commit 08fe003

Browse files
authored
Merge pull request #11862 from hugovk/replace-deprecated-BadZipfile
Replace deprecated `BadZipfile` with `BadZipFile`
2 parents 4b14e7c + 25a056d commit 08fe003

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pip/_internal/network/lazy_wheel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from contextlib import contextmanager
77
from tempfile import NamedTemporaryFile
88
from typing import Any, Dict, Generator, List, Optional, Tuple
9-
from zipfile import BadZipfile, ZipFile
9+
from zipfile import BadZipFile, ZipFile
1010

1111
from pip._vendor.packaging.utils import canonicalize_name
1212
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
@@ -160,7 +160,7 @@ def _check_zip(self) -> None:
160160
# For read-only ZIP files, ZipFile only needs
161161
# methods read, seek, seekable and tell.
162162
ZipFile(self) # type: ignore
163-
except BadZipfile:
163+
except BadZipFile:
164164
pass
165165
else:
166166
break

0 commit comments

Comments
 (0)