Description
Issue description
We use private modules installed in editable mode per the docs that reference a specific git tag. An example entry in our Pipfile
:
our_package = {git = "ssh://git@github.com/mycomp/our-repo.git", editable = true, ref = "release/v318"}
As of pipenv 2022.7.4, this now fails to lock, with an error that looks like:
pipenv.patched.notpip._internal.exceptions.InstallationSubprocessError: git clone --filter=blob:none 'ssh://****@github.com/mycomp/ourrepo.git@release/v318' /var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/requirementslib-3i6fm8qz-src/our_package exited with 128
If you look closely, you see that the @release/v318
is included in the clone command, which it should not be.
It worked as of 2022.6.7
Here is my analysis, though I'm not entirely sure of the correct solution. It seems to involve an upstream change to requirementslib. If this is so, I'm happy to open an issue there as well.
2022.6.7
>>> from pipenv.vendor.requirementslib import __version__
>>> __version__
'1.6.4'
>>> from pipenv.vendor.requirementslib.models.requirements import Line
>>> Line("-e git+ssh://git@github.com/mycomp/our_repo.git@release/v318#egg=our_package")
<Line (editable=True, name=our_package, path=None, uri=git+ssh://git@github.com/mycomp/our_repo.git, extras=(), markers=None, vcs=git, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=None)>
2022.7.4
>>> from pipenv.vendor.requirementslib import __version__
>>> __version__
'1.6.6'
>>> from pipenv.vendor.requirementslib.models.requirements import Line
>>> Line("-e git+ssh://git@github.com/mycomp/our_repo.git@release/v318#egg=our_package")
<Line (editable=True, name=our_package, path=None, uri=git+ssh://git@github.com/mycomp/our_repo.git@release/v318, extras=(), markers=None, vcs=git, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=None)>
The problem is possibly more apparent when you look at Requirement.from_line
:
2022.6.7
>>> from pipenv.vendor.requirementslib.models.requirements import Requirement
>>> Requirement.from_line("-e git+ssh://git@github.com/mycomp/our_repo.git@release/v318#egg=our_package").pipfile_entry
('our_package', {'editable': True, 'ref': 'release/v318', 'git': 'ssh://git@github.com/mycomp/our_repo.git'})
2022.7.4
>>> from pipenv.vendor.requirementslib.models.requirements import Requirement
>>> Requirement.from_line("-e git+ssh://git@github.com/mycomp/our_repo.git@release/v318#egg=our_package").pipfile_entry
('our_package', {'editable': True, 'git': 'ssh://git@github.com/mycomp/our_repo.git@release/v318'})
Sorry for not following the normal issue format, but I hope the above analysis is still clear.
I'm happy to provide more information, and I'm also happy to open an issue (+ a PR) on the requirementslib side.