diff --git a/news/8711.removal.rst b/news/8711.removal.rst new file mode 100644 index 00000000000..80423aa4259 --- /dev/null +++ b/news/8711.removal.rst @@ -0,0 +1 @@ +Un-deprecate source distribution re-installation behaviour. diff --git a/src/pip/_internal/resolution/resolvelib/resolver.py b/src/pip/_internal/resolution/resolvelib/resolver.py index f89afaf433c..12f96702024 100644 --- a/src/pip/_internal/resolution/resolvelib/resolver.py +++ b/src/pip/_internal/resolution/resolvelib/resolver.py @@ -19,8 +19,6 @@ PipDebuggingReporter, PipReporter, ) -from pip._internal.utils.deprecation import deprecated -from pip._internal.utils.filetypes import is_archive_file from .base import Candidate, Requirement from .factory import Factory @@ -136,25 +134,6 @@ def resolve( ) continue - looks_like_sdist = ( - is_archive_file(candidate.source_link.file_path) - and candidate.source_link.ext != ".zip" - ) - if looks_like_sdist: - # is a local sdist -- show a deprecation warning! - reason = ( - "Source distribution is being reinstalled despite an " - "installed package having the same name and version as " - "the installed package." - ) - replacement = "use --force-reinstall" - deprecated( - reason=reason, - replacement=replacement, - gone_in="21.3", - issue=8711, - ) - # is a local sdist or path -- reinstall ireq.should_reinstall = True else: diff --git a/tests/functional/test_new_resolver.py b/tests/functional/test_new_resolver.py index 052c001791b..26e0886f1ed 100644 --- a/tests/functional/test_new_resolver.py +++ b/tests/functional/test_new_resolver.py @@ -1228,7 +1228,6 @@ def test_new_resolver_does_reinstall_local_sdists(script): expect_stderr=True, ) assert "Installing collected packages: pkg" in result.stdout, str(result) - assert "DEPRECATION" in result.stderr, str(result) script.assert_installed(pkg="1.0")