(PUP-11029) Fix pip package provider to query available versions #8675
+52
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting with version
20.3b1
,pip
removed available versions of a package from output when trying to install a wrong or unavailable version. Puppet is using this output to gather all available versions of a package and determine the latest one. Even though this regression got fixed in21.1
version ofpip
, this commit adds the--use-deprecated=legacy-resolver
argument when querying available versions of the managed package and also using any of the affected versions ofpip
.Before fix:
After fix:
Versions affected by this issue
pip3 v20.2.4 output:
pip3 v20.3b1 output:
...
pip3 v21.0.1 output:
pip3 v21.1 output:
Note: Fixed version also known from [pip3 changelog|https://pip.pypa.io/en/stable/news/].
Output with
--use-deprecated=legacy-resolver
argumentUseful info for testing this fix
To get pip3 on a Ubuntu vm
To see current pip3 version
To see available pip3 versions
To install a certain pip3 version
Note:
pip3
from/usr/bin/pip3
to/usr/local/bin/pip3
.➜ apt-get install --reinstall python3-pip
or
➜ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py