pip freeze generating format that's incorrectly parsed by pip install -r

Created on 15 Sep 2014  ·  3Comments  ·  Source: pypa/pip

I have lines in my pip freeze output like:

-e [email protected]:widgets.git@3bdaf7d07c44a87c38beb1e8abd163a7edf99adc#egg=widgets
-e [email protected]:[email protected]#egg=gadgets

When it comes time to install using pip install -r requirements.txt it appears that pip incorrectly identifies example.com:[email protected] as the full URL of the git repository when it fact it should just be example.com:gadgets.git and then it should check out the 3bda...99adc commit.

If I try to install using the pip freeze output, e.g.

pip install -e [email protected]:[email protected]#egg=gadgets

I get the same error.

This is all using pip 1.5.4

freeze vcs awaiting PR auto-locked bug

All 3 comments

Note that with the following changes it works correctly:

pip install -e [email protected]:/path/to/project/[email protected]#egg=project

or

pip install -e [email protected]:project.git#egg=project

Although in the latter, it will obviously only pull up the current commit and not the one specified in 3bdaf…

Also, for reasons I don't fathom, it _does_ work for requests to github.

That is,

pip install -e [email protected]:JordanReiter/[email protected]#egg=github_project

works.

This is similar to #6293. The parser (based on stdlib urlsplit has problems identifying the path part of the URL when the it contains no / at all, and identify the whole thing after + as netloc. The variant without rev works totally by accident because netloc and path are later joined back and passed to Git (which does the right thing automatically).

Discussions in #6293 seem to favour dropping SCP-style URL support entirely, so the better solution here would be fore pip freeze to spit out git+ssh:// URLs instead.

Closing as we propose to remove the git+git@ form in #7554.

Was this page helpful?
0 / 5 - 0 ratings