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

Updated requirements for pip 6.0+ to include a session #32

Closed
wants to merge 2 commits into from
Closed

Updated requirements for pip 6.0+ to include a session #32

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 3, 2015

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.

barneydesmond added a commit to WhereSoftwareGoesToDie/ceilometer-publisher-zeromq that referenced this pull request Jan 13, 2015
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())

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().

Copy link
Author

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.

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)
@ghost
Copy link
Author

ghost commented Jan 14, 2015

Fixed the pull request as per @reversefold comments. I'm slighly worried it could break installation from previous pip versions though...

@reversefold
Copy link

pip.download.PipSession was introduced at the same time as the session kwarg to parse_requirements, in pip 1.5, so you're not losing support for anything by using the correct value for the param.

@joybro
Copy link

joybro commented Jan 24, 2015

+1

@tdryer
Copy link

tdryer commented Feb 8, 2015

+1

Travis CI seems to have upgraded their pip so now my builds are failing.

@benoitc
Copy link

benoitc commented Feb 15, 2015

when will it be fixed ? I see many related pr

zjcheah added a commit to zjcheah/Adlibre-TMS that referenced this pull request Mar 11, 2015
Updated requirements for pip 6.0+ to include a session as per jmcarp/robobrowser#32
jmcarp added a commit that referenced this pull request Apr 17, 2015
[resolves #39]
[supersedes #38]
[supersedes #37]
[supersedes #35]
[supersedes #32]
@jmcarp
Copy link
Owner

jmcarp commented Apr 18, 2015

Thanks for the patch! I wound up fixing this by skipping parse_requirements entirely in 4878ed3.

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.

None yet

6 participants