Skip to content

Commit 4b14e7c

Browse files
authored
Remove no longer needed setuptools hack (#11837)
1 parent 30fd549 commit 4b14e7c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

news/11837.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
More consistent resolution backtracking by removing legacy hack related to setuptools resolution

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,24 +179,13 @@ def get_preference(
179179
# free, so we always do it first to avoid needless work if it fails.
180180
requires_python = identifier == REQUIRES_PYTHON_IDENTIFIER
181181

182-
# HACK: Setuptools have a very long and solid backward compatibility
183-
# track record, and extremely few projects would request a narrow,
184-
# non-recent version range of it since that would break a lot things.
185-
# (Most projects specify it only to request for an installer feature,
186-
# which does not work, but that's another topic.) Intentionally
187-
# delaying Setuptools helps reduce branches the resolver has to check.
188-
# This serves as a temporary fix for issues like "apache-airflow[all]"
189-
# while we work on "proper" branch pruning techniques.
190-
delay_this = identifier == "setuptools"
191-
192182
# Prefer the causes of backtracking on the assumption that the problem
193183
# resolving the dependency tree is related to the failures that caused
194184
# the backtracking
195185
backtrack_cause = self.is_backtrack_cause(identifier, backtrack_causes)
196186

197187
return (
198188
not requires_python,
199-
delay_this,
200189
not direct,
201190
not pinned,
202191
not backtrack_cause,

0 commit comments

Comments
 (0)