Skip to content

(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

Merged
merged 2 commits into from
Apr 11, 2016

Conversation

jskarpe
Copy link
Contributor

@jskarpe jskarpe commented Apr 4, 2016

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

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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@kylog
Copy link

kylog commented Apr 5, 2016

@yuav thanks for the contribution! Do you mind signing the CLA at https://cla.puppetlabs.com/?

@kylog
Copy link

kylog commented Apr 5, 2016

This generally looks reasonable. It makes me wonder why this code was ever going straight to the XML-RPC api.

@jskarpe
Copy link
Contributor Author

jskarpe commented Apr 7, 2016

CLA signed

@jskarpe
Copy link
Contributor Author

jskarpe commented Apr 7, 2016

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

@puppetcla
Copy link

CLA signed by all contributors.

@jskarpe
Copy link
Contributor Author

jskarpe commented Apr 11, 2016

Tests for features re-added, as per comments from MikaelSmith

@jskarpe
Copy link
Contributor Author

jskarpe commented Apr 11, 2016

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|
Copy link
Contributor

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

Copy link
Contributor

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.

@MikaelSmith
Copy link
Contributor

You were right. I'm double-checking functionality, but this looks good.

@MikaelSmith MikaelSmith merged commit 152299c into puppetlabs:master Apr 11, 2016
@jskarpe jskarpe deleted the pip_provider_fix branch April 15, 2016 07:46
@kylog kylog mentioned this pull request Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants