102 lines
4.6 KiB
Diff
102 lines
4.6 KiB
Diff
|
From bbadab2515922ef3889f1c4057e9368bd1b717ed Mon Sep 17 00:00:00 2001
|
||
|
From: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
|
||
|
Date: Tue, 9 Nov 2021 15:13:19 +0800
|
||
|
Subject: [PATCH] Upgrade `resolvelib>=0.6.0,<1.0.0`
|
||
|
|
||
|
Since 2021-09-27 `resolvelib` author comment with "issue resolved now"
|
||
|
(see https://github.com/sarugaku/resolvelib/issues/69#issuecomment-927333533).
|
||
|
|
||
|
Replace `resolvelib` version upper cap with `resolvelib>=0.6.0,<1.0.0`
|
||
|
with corresponding `find_matches()` interface change should now be good
|
||
|
enough.
|
||
|
|
||
|
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
|
||
|
---
|
||
|
docs/docsite/known_good_reqs.txt | 2 +-
|
||
|
lib/ansible/galaxy/dependency_resolution/providers.py | 3 ++-
|
||
|
requirements.txt | 2 +-
|
||
|
test/lib/ansible_test/_data/requirements/ansible.txt | 2 +-
|
||
|
test/sanity/code-smell/docs-build.requirements.txt | 2 +-
|
||
|
test/sanity/code-smell/package-data.requirements.txt | 2 +-
|
||
|
6 files changed, 7 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/docs/docsite/known_good_reqs.txt b/docs/docsite/known_good_reqs.txt
|
||
|
index 75323d13b02286..89101bab91aec2 100644
|
||
|
--- a/docs/docsite/known_good_reqs.txt
|
||
|
+++ b/docs/docsite/known_good_reqs.txt
|
||
|
@@ -9,7 +9,7 @@ docutils==0.16
|
||
|
jinja2==3.0.1
|
||
|
Pygments==2.9.0
|
||
|
PyYAML==5.4.1
|
||
|
-resolvelib==0.5.4
|
||
|
+resolvelib==0.8.1
|
||
|
rstcheck==3.3.1
|
||
|
sphinx==4.0.2
|
||
|
sphinx-notfound-page==0.7.1 # must be >= 0.6
|
||
|
diff --git a/lib/ansible/galaxy/dependency_resolution/providers.py b/lib/ansible/galaxy/dependency_resolution/providers.py
|
||
|
index 35b2cedabca41b..2819262b2826f2 100644
|
||
|
--- a/lib/ansible/galaxy/dependency_resolution/providers.py
|
||
|
+++ b/lib/ansible/galaxy/dependency_resolution/providers.py
|
||
|
@@ -182,7 +182,7 @@ def get_preference(
|
||
|
return float('-inf')
|
||
|
return len(candidates)
|
||
|
|
||
|
- def find_matches(self, requirements):
|
||
|
+ def find_matches(self, identifier, requirements, incompatibilities):
|
||
|
# type: (List[Requirement]) -> List[Candidate]
|
||
|
r"""Find all possible candidates satisfying given requirements.
|
||
|
|
||
|
@@ -208,6 +208,7 @@ def find_matches(self, requirements):
|
||
|
# FIXME: its cloned tmp dir. Using only the first one creates
|
||
|
# FIXME: loops that prevent any further dependency exploration.
|
||
|
# FIXME: We need to figure out how to prevent this.
|
||
|
+ requirements = list(requirements[identifier])
|
||
|
first_req = requirements[0]
|
||
|
fqcn = first_req.fqcn
|
||
|
# The fqcn is guaranteed to be the same
|
||
|
diff --git a/requirements.txt b/requirements.txt
|
||
|
index a732a5951d2190..bf02006697b4e9 100644
|
||
|
--- a/requirements.txt
|
||
|
+++ b/requirements.txt
|
||
|
@@ -10,4 +10,4 @@ packaging
|
||
|
# NOTE: resolvelib 0.x version bumps should be considered major/breaking
|
||
|
# NOTE: and we should update the upper cap with care, at least until 1.0
|
||
|
# NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69
|
||
|
-resolvelib >= 0.5.3, < 0.6.0 # dependency resolver used by ansible-galaxy
|
||
|
+resolvelib >= 0.6.0, < 1.0.0 # dependency resolver used by ansible-galaxy
|
||
|
diff --git a/test/lib/ansible_test/_data/requirements/ansible.txt b/test/lib/ansible_test/_data/requirements/ansible.txt
|
||
|
index a732a5951d2190..bf02006697b4e9 100644
|
||
|
--- a/test/lib/ansible_test/_data/requirements/ansible.txt
|
||
|
+++ b/test/lib/ansible_test/_data/requirements/ansible.txt
|
||
|
@@ -10,4 +10,4 @@ packaging
|
||
|
# NOTE: resolvelib 0.x version bumps should be considered major/breaking
|
||
|
# NOTE: and we should update the upper cap with care, at least until 1.0
|
||
|
# NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69
|
||
|
-resolvelib >= 0.5.3, < 0.6.0 # dependency resolver used by ansible-galaxy
|
||
|
+resolvelib >= 0.6.0, < 1.0.0 # dependency resolver used by ansible-galaxy
|
||
|
diff --git a/test/sanity/code-smell/docs-build.requirements.txt b/test/sanity/code-smell/docs-build.requirements.txt
|
||
|
index 36fc363a0e40cc..19b2958a80396f 100644
|
||
|
--- a/test/sanity/code-smell/docs-build.requirements.txt
|
||
|
+++ b/test/sanity/code-smell/docs-build.requirements.txt
|
||
|
@@ -1,6 +1,6 @@
|
||
|
jinja2 == 3.0.1
|
||
|
pyyaml == 5.4.1
|
||
|
-resolvelib == 0.5.4
|
||
|
+resolvelib == 0.8.1
|
||
|
sphinx == 2.1.2
|
||
|
sphinx-notfound-page == 0.7.1
|
||
|
sphinx-ansible-theme == 0.8.0
|
||
|
diff --git a/test/sanity/code-smell/package-data.requirements.txt b/test/sanity/code-smell/package-data.requirements.txt
|
||
|
index 8055b3c5c701f3..aab0f70cccfbd2 100644
|
||
|
--- a/test/sanity/code-smell/package-data.requirements.txt
|
||
|
+++ b/test/sanity/code-smell/package-data.requirements.txt
|
||
|
@@ -2,7 +2,7 @@ docutils == 0.17.1
|
||
|
jinja2 == 3.0.1
|
||
|
packaging == 21.0
|
||
|
pyyaml == 5.4.1 # ansible-core requirement
|
||
|
-resolvelib == 0.5.4 # ansible-core requirement
|
||
|
+resolvelib == 0.8.1 # ansible-core requirement
|
||
|
rstcheck == 3.3.1
|
||
|
straight.plugin == 1.5.0
|
||
|
antsibull-changelog == 0.9.0
|