Skip to content

Commit ae2c9ed

Browse files
authored
Merge pull request #10543 from pradyunsg/drop-sdist-reinstall
Un-deprecate source distribution re-installation behaviour
2 parents 02b4f86 + 68e22aa commit ae2c9ed

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

news/8711.removal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Un-deprecate source distribution re-installation behaviour.

src/pip/_internal/resolution/resolvelib/resolver.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
PipDebuggingReporter,
2020
PipReporter,
2121
)
22-
from pip._internal.utils.deprecation import deprecated
23-
from pip._internal.utils.filetypes import is_archive_file
2422

2523
from .base import Candidate, Requirement
2624
from .factory import Factory
@@ -136,25 +134,6 @@ def resolve(
136134
)
137135
continue
138136

139-
looks_like_sdist = (
140-
is_archive_file(candidate.source_link.file_path)
141-
and candidate.source_link.ext != ".zip"
142-
)
143-
if looks_like_sdist:
144-
# is a local sdist -- show a deprecation warning!
145-
reason = (
146-
"Source distribution is being reinstalled despite an "
147-
"installed package having the same name and version as "
148-
"the installed package."
149-
)
150-
replacement = "use --force-reinstall"
151-
deprecated(
152-
reason=reason,
153-
replacement=replacement,
154-
gone_in="21.3",
155-
issue=8711,
156-
)
157-
158137
# is a local sdist or path -- reinstall
159138
ireq.should_reinstall = True
160139
else:

tests/functional/test_new_resolver.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,6 @@ def test_new_resolver_does_reinstall_local_sdists(script):
12281228
expect_stderr=True,
12291229
)
12301230
assert "Installing collected packages: pkg" in result.stdout, str(result)
1231-
assert "DEPRECATION" in result.stderr, str(result)
12321231
script.assert_installed(pkg="1.0")
12331232

12341233

0 commit comments

Comments
 (0)