Skip to content

Commit

Permalink
Remove no longer needed setuptools hack
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Mar 5, 2023
1 parent 30fd549 commit c4d58ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions news/11837.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
More consistent resolution backtracking by removing legacy hack related to setuptools resolution
11 changes: 0 additions & 11 deletions src/pip/_internal/resolution/resolvelib/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,24 +179,13 @@ def get_preference(
# free, so we always do it first to avoid needless work if it fails.
requires_python = identifier == REQUIRES_PYTHON_IDENTIFIER

# HACK: Setuptools have a very long and solid backward compatibility
# track record, and extremely few projects would request a narrow,
# non-recent version range of it since that would break a lot things.
# (Most projects specify it only to request for an installer feature,
# which does not work, but that's another topic.) Intentionally
# delaying Setuptools helps reduce branches the resolver has to check.
# This serves as a temporary fix for issues like "apache-airflow[all]"
# while we work on "proper" branch pruning techniques.
delay_this = identifier == "setuptools"

# Prefer the causes of backtracking on the assumption that the problem
# resolving the dependency tree is related to the failures that caused
# the backtracking
backtrack_cause = self.is_backtrack_cause(identifier, backtrack_causes)

return (
not requires_python,
delay_this,
not direct,
not pinned,
not backtrack_cause,
Expand Down

0 comments on commit c4d58ad

Please sign in to comment.