-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use pip-api instead of pip's internal APIs #59
Conversation
@peterbe Since this PR would definitely not work for Python 2.6 and 3.3 users, I added a |
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 love it!
However, the only reason we now need to depend on another new package is just to be able to throw an error for people using pip 7 and older.
Basically, since we're no longer depending on pip
directly (instead we're depending on pip-api
) perhaps we don't need to say you have to have pip >=8
.
I.e. if you have pip 6 and install hashin
and pip-api
you'd be run pip_api.hash(filename, algorithm)
anyway, right?
What I'm arguing is, can we avoid depending on |
@peterbe That's a great point, I hadn't actually looked closely at what you were using Fixing... |
Wait, I think I've misunderstood. I thought you were using Lines 217 to 220 in 66aa748
Seems to me like you still need the |
This is where you're checking the pip version: Lines 75 to 79 in 66aa748
In this PR, I've switched it to using |
I don't know how
In that case, will I have a feeling that |
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 checked the documentation for pip-api
and basically, the same reality is still the case. If you have pip <8
installed hashing won't work even with latest pip-api
installed. In other words, we need to keep that if major_pip_version < 8:
check around except with this PR, the way we get to major_pip_version
is now done differently.
Yeah, |
Just release 0.13.0 Thanks for all your hard work even though I failed to mention you in my tweet. It's a bit weird to make a minor upgrade when the API didn't change at all. But this way the 2.6 and 3.3 support drop is more clear. Plus to get 0.13.0 you now also need to install other stuff. |
Fixes #58.
Instead of using
pip
's internal APIs, which will be moving inpip==10.0.0
, usepip-api
instead.Also switches to using the
packaging
project directly, rather thanpip
vendored version of it (I didn't see why this would be necessary).