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

pipenv 2023.8.26 and 2023.9.1 ignore editable=true for vcs install #5923

Closed
dennisvang opened this issue Sep 7, 2023 · 10 comments
Closed

pipenv 2023.8.26 and 2023.9.1 ignore editable=true for vcs install #5923

dennisvang opened this issue Sep 7, 2023 · 10 comments
Labels
Type: Regression This issue is a regression of a previous behavior.

Comments

@dennisvang
Copy link

dennisvang commented Sep 7, 2023

Issue description

Pipfile contains a line as follows, to do a vcs install (git) from bitbucket:

...

[packages]
mypackage = {git = "ssh://bitbucket.org/my-username/my-package.git", ref = "2023.8", editable = true}

[requires]
python_version = "3.8"

Note the editable = true.

Using pipenv 2023.7.23 this works as expected: the package is installed as editable, and ends up in my venv/src directory.

Using pipenv 2023.8.26 (and 2023.9.1), this does not work as expected: the package is installed normally (i.e. not editable), in venv/lib/python3.8/site-packages

Expected result

I would expect the package to be installed into venv/src, as described in the pip docs.

Actual result

Package is built and ends up in venv/lib/python3.8/site-packages

Steps to replicate

Install a package from vcs, using a pipfile similar to the above.

References

Possibly related (?):

@dennisvang
Copy link
Author

dennisvang commented Sep 7, 2023

I first noticed this on AWS EC2 after upgrading Amazon Linux 2 from AL2 3.5.5 to AL2 3.5.6. AL2 3.5.5 uses pipenv 2023.7.23, whereas AL2 3.5.6 uses pipenv 2023.8.26. I was also able to reproduce the issue locally on Ubuntu 22.04.3 LTS with pipenv 2023.9.1.

@dennisvang dennisvang changed the title pipenv 2023.8.26 and 2023.9.1 ignore editable=true for vcs install pipenv 2023.8.26 and 2023.9.1 ignores editable=true for vcs install Sep 7, 2023
@dennisvang dennisvang changed the title pipenv 2023.8.26 and 2023.9.1 ignores editable=true for vcs install pipenv 2023.8.26 and 2023.9.1 ignore editable=true for vcs install Sep 7, 2023
@matteius
Copy link
Member

matteius commented Sep 7, 2023

Worth checking if still an issue in 2023.9.7 -- it might be, I was under the impression you can't have an editable vcs install, just local file installs.

@dennisvang
Copy link
Author

dennisvang commented Sep 7, 2023

@matteius Thanks for the quick reply.

I uninstalled mypackage, upgraded pipenv to 2023.9.7, and did a pipenv update with the original Pipfile described above, but it yields a

[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. 
...
ERROR: Getting requirements to build wheel exited with 1

UPDATE:

Just verified:

  • Same ResolutionFailure occurs if I try to create a fresh venv using pipenv install (also 2023.9.7).

  • This ResolutionFailure does not occur using pipenv <= 2023.9.1.

@dennisvang
Copy link
Author

dennisvang commented Sep 7, 2023

... I was under the impression you can't have an editable vcs install ...

@matteius there is a section in the pip docs: https://pip.pypa.io/en/stable/topics/vcs-support/#editable-vcs-installs

(I've updated the OP with this link)

@matteius
Copy link
Member

matteius commented Sep 7, 2023

The resolution failure you say is on 2023.9.7 only sounds troubling to me but I'd really need more details around it, since the example Pipfile is just an example format.

@matteius matteius added the Type: Regression This issue is a regression of a previous behavior. label Sep 7, 2023
@dennisvang
Copy link
Author

dennisvang commented Sep 8, 2023

@matteius I can provide more detail about the resolution failure for 2023.9.7, but it appears to be unrelated to the present issue.

I verified this by removing the mypackage vcs-install line from the Pipfile (see OP) and attempting a fresh pipenv install.

This is on a different (ubuntu) system. The error I'm seeing now is slightly different (both with and without the mypackage vcs-install):

[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved.
...
ERROR: metadata generation failed

(before, on the other system, I got ERROR: Getting requirements to build wheel exited with 1)

Again, the fresh pipenv install does succeed after rolling back pipenv to 2023.9.1.

Should I open a separate issue for this?

@matteius
Copy link
Member

matteius commented Sep 8, 2023

@dennisvang Actually that is probably related to: #5924

There is an associated PR that fixes it. Also I just opened a VCS editable install -- could use help checking it, but it doesn't include the fix for the resolution (two separate PRs right now).

@matteius
Copy link
Member

matteius commented Sep 8, 2023

@dennisvang I merged the resolver fix into main and into the editable vcs branch to make it easier to verify. If you can check out the vcs branch and see if its working for your case, that would be helpful for me including it in a 2023.9.8 release (assuming it passes also CI).

@dennisvang
Copy link
Author

dennisvang commented Sep 8, 2023

@matteius After a clean install of pipenv from the issue-editable-vcs branch, I can confirm that both issues appear to be resolved for my case:

  • fresh pipenv install succeeds without any resolution failure
  • editable install of mypackage works as expected, i.e. the package is installed into venv/src

@matteius
Copy link
Member

matteius commented Sep 8, 2023

https://pypi.org/project/pipenv/2023.9.8/

@matteius matteius closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Regression This issue is a regression of a previous behavior.
Projects
None yet
Development

No branches or pull requests

2 participants