mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Merge pull request #11862 from hugovk/replace-deprecated-BadZipfile
Replace deprecated `BadZipfile` with `BadZipFile`
This commit is contained in:
commit
08fe0031ed
|
@ -6,7 +6,7 @@ from bisect import bisect_left, bisect_right
|
|||
from contextlib import contextmanager
|
||||
from tempfile import NamedTemporaryFile
|
||||
from typing import Any, Dict, Generator, List, Optional, Tuple
|
||||
from zipfile import BadZipfile, ZipFile
|
||||
from zipfile import BadZipFile, ZipFile
|
||||
|
||||
from pip._vendor.packaging.utils import canonicalize_name
|
||||
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
|
||||
|
@ -160,7 +160,7 @@ class LazyZipOverHTTP:
|
|||
# For read-only ZIP files, ZipFile only needs
|
||||
# methods read, seek, seekable and tell.
|
||||
ZipFile(self) # type: ignore
|
||||
except BadZipfile:
|
||||
except BadZipFile:
|
||||
pass
|
||||
else:
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue