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
Updated requirements for pip 6.0+ to include a session #32
Conversation
The parse_requirements function has changed, and requires a session parameter to be supplied. See this for an example of the complaint and a fix. jmcarp/robobrowser#32
@@ -35,7 +35,7 @@ def find_version(fname): | |||
history = open('HISTORY.rst').read().replace('.. :changelog:', '') | |||
requirements = [ | |||
str(requirement.req) | |||
for requirement in parse_requirements('requirements.txt') | |||
for requirement in parse_requirements('requirements.txt', session=uuid.uuid1()) |
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.
Why are you using uuid.uuid1() as the session? It should be a pip.download.PipSession().
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.
Actually, all I wanted was a unique id to fill in the session variable. It is not used afterwards anyways. but yes pip.download.PipSession() would also work there.
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.
uuid.uuid1() is a bad precedent to set as it will fail if, for any reason, pip tries to actually use it.
Replaced uuid.uuid1() by pip.download.PipSession() as recommended by @reversefold (https://github.com/reversefold)
Fixed the pull request as per @reversefold comments. I'm slighly worried it could break installation from previous pip versions though... |
|
+1 |
+1 Travis CI seems to have upgraded their pip so now my builds are failing. |
when will it be fixed ? I see many related pr |
Updated requirements for pip 6.0+ to include a session as per jmcarp/robobrowser#32
Thanks for the patch! I wound up fixing this by skipping |
Installing robobrowser with pip 6.0+ was failing due to:
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
Fixed setup.py to include a session.