-
Notifications
You must be signed in to change notification settings - Fork 2.2k
(PUP-6120) Pip package provider compatibility with CLI #4832
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
Conversation
Reduce dependencies to only require pip installed. This results in: Removed complexity: Poll from PyPI API directly Special case proxies Added functionality: pip can now properly manage pip package from pip repository
end | ||
|
||
describe 'provider features' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maintain these, as they're not inherited from the parent provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's not inherited? The pip3 implementation is really small, levering almost everything from the pip provider. Why have duplicated tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant specifically features. Features don't appear to be inherited, which was fixed in 45c2656.
@yuav thanks for the contribution! Do you mind signing the CLA at https://cla.puppetlabs.com/? |
This generally looks reasonable. It makes me wonder why this code was ever going straight to the XML-RPC api. |
CLA signed |
I would assume the original approach is due to the fact that Pip doesn't have any official way to look up versions from PyPI. My approach is a hack, but it works |
CLA signed by all contributors. |
Tests for features re-added, as per comments from MikaelSmith |
Hmm, that Travis failure doesn't seem to be related |
|
||
def latest_with_new_pip | ||
# Less resource intensive approach for pip version 1.5.4 and above | ||
execpipe ["#{self.class.pip_cmd}", "install", "#{@resource[:name]}==versionplease"] do |process| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you're using install, instead of something like
$ pip search sslyze
SSLyze (0.13.3) - Fast and full-featured SSL scanner.
INSTALLED: 0.13.5
LATEST: 0.13.3
nassl (0.13.3) - Experimental OpenSSL wrapper for Python 2.7 and SSLyze.
INSTALLED: 0.13.5
LATEST: 0.13.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, looking at how you're using it, seems like it's probably easier to parse install.
You were right. I'm double-checking functionality, but this looks good. |
Reduce dependencies to only require pip installed.
This results in:
Removed complexity:
Added functionality: