diff --git a/news/7037.removal b/news/7037.removal new file mode 100644 index 00000000000..577a02f5e46 --- /dev/null +++ b/news/7037.removal @@ -0,0 +1,2 @@ +Remove undocumented support for http:// requirements pointing to SVN +repositories. diff --git a/src/pip/_internal/download.py b/src/pip/_internal/download.py index eaf9e2e12ab..14dbb1d815f 100644 --- a/src/pip/_internal/download.py +++ b/src/pip/_internal/download.py @@ -1024,7 +1024,7 @@ def unpack_http_url( # unpack the archive to the build dir location. even when only # downloading archives, they have to be unpacked to parse dependencies - unpack_file(from_path, location, content_type, link) + unpack_file(from_path, location, content_type) # a download dir is specified; let's copy the archive there if download_dir and not already_downloaded_path: @@ -1120,7 +1120,7 @@ def unpack_file_url( # unpack the archive to the build dir location. even when only downloading # archives, they have to be unpacked to parse dependencies - unpack_file(from_path, location, content_type, link) + unpack_file(from_path, location, content_type) # a download dir is specified and not already downloaded if download_dir and not already_downloaded_path: diff --git a/src/pip/_internal/utils/unpacking.py b/src/pip/_internal/utils/unpacking.py index 62b196668f6..92424da5ad3 100644 --- a/src/pip/_internal/utils/unpacking.py +++ b/src/pip/_internal/utils/unpacking.py @@ -8,7 +8,6 @@ import logging import os -import re import shutil import stat import tarfile @@ -21,13 +20,11 @@ XZ_EXTENSIONS, ZIP_EXTENSIONS, ) -from pip._internal.utils.misc import ensure_dir, hide_url +from pip._internal.utils.misc import ensure_dir from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: - from typing import Iterable, List, Optional, Match, Text, Union - - from pip._internal.models.link import Link + from typing import Iterable, List, Optional, Text, Union logger = logging.getLogger(__name__) @@ -56,23 +53,6 @@ def current_umask(): return mask -def file_contents(filename): - # type: (str) -> Text - with open(filename, 'rb') as fp: - return fp.read().decode('utf-8') - - -def is_svn_page(html): - # type: (Union[str, Text]) -> Optional[Match[Union[str, Text]]] - """ - Returns true if the page appears to be the index page of an svn repository - """ - return ( - re.search(r'