Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 7.x] Support pip freeze URL format #9311

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

joshcooper
Copy link
Contributor

pip freeze (https://pip.pypa.io/en/stable/cli/pip_freeze/) "outputs installed packages in requirements format"
(https://pip.pypa.io/en/stable/reference/requirement-specifiers/). As of pip 19.1, pip also supports specifying a requirement as a URL, and, for packages that were installed using URL format, pip freeze will output package requirements in URL format.

However, Puppet's pip freeze parser doesn't support URL format, so it doesn't realize that a package is installed if it uses URL format, causing every puppet agent run to attempt to reinstall the package.

This PR adds support for parsing pip freeze URL format.

(cherry picked from commit 207a7dc)

Backport: #9280

`pip freeze` (https://pip.pypa.io/en/stable/cli/pip_freeze/) "outputs
installed packages in requirements format"
(https://pip.pypa.io/en/stable/reference/requirement-specifiers/).
As of pip 19.1, pip also supports specifying a requirement as a URL,
and, for packages that were installed using URL format, `pip freeze`
will output package requirements in URL format.

However, Puppet's `pip freeze` parser doesn't support URL format, so
it doesn't realize that a package is installed if it uses URL format,
causing every `puppet agent` run to attempt to reinstall the package.

This PR adds support for parsing `pip freeze` URL format.

(cherry picked from commit 207a7dc)
@tvpartytonight tvpartytonight merged commit f57e31e into puppetlabs:7.x Apr 2, 2024
12 checks passed
@joshcooper joshcooper deleted the backport_9280 branch April 2, 2024 22:25
@joshcooper joshcooper added the enhancement New feature or request label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants