From c4d58ad9a9b1314cf610eecc20ca0fae68e6e569 Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sun, 5 Mar 2023 01:12:19 -0500 Subject: [PATCH] Remove no longer needed setuptools hack --- news/11837.bugfix.rst | 1 + src/pip/_internal/resolution/resolvelib/provider.py | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) create mode 100644 news/11837.bugfix.rst diff --git a/news/11837.bugfix.rst b/news/11837.bugfix.rst new file mode 100644 index 00000000000..6d33ed6800c --- /dev/null +++ b/news/11837.bugfix.rst @@ -0,0 +1 @@ +More consistent resolution backtracking by removing legacy hack related to setuptools resolution diff --git a/src/pip/_internal/resolution/resolvelib/provider.py b/src/pip/_internal/resolution/resolvelib/provider.py index b08cce7f333..315fb9c8902 100644 --- a/src/pip/_internal/resolution/resolvelib/provider.py +++ b/src/pip/_internal/resolution/resolvelib/provider.py @@ -179,16 +179,6 @@ 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 @@ -196,7 +186,6 @@ def get_preference( return ( not requires_python, - delay_this, not direct, not pinned, not backtrack_cause,