pipenv: Private packages not updated unless environment is removed

Issue description

Private packages defined with an object like mylib = {ref = "dev" git = "ssh://git.mycompany.com/my-lib.git"} are not being updated on my virtual env, even after the pipenv update creates a new Pipfile.lock with the correct commit id.

Expected result

After calling pipenv update, I expect the Pipfile.lock ref to change and also the code in my environment to change, such that I have access to the new code within my project.

Actual result

I see the Pipfile.lock ref change, but the actual code for my dependency does not change.

If I do pipenv --rm to remove the environment and then re-create the environment, I can get the actual code change to replicate on disk.

Steps to replicate

Update my-lib with some code change, commit and push. On my project, do pipenv update and wait for the process to finish.

Check that the Pipfile.lock has changed and has the correct ref for the new commit in my-lib.

Check that the code for my-lib hasnt actually changed within my original projects virtual env.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

@joaomcarlos 2023.8.19 has been released 🤞

@matteius all is gut 😄 No rush. I hope your holiday was good!

I saw, just don’t have time at the moment–getting back to work after two weeks off 😅

Right, we tested it and we saw the same behavior.

Lets re-cap:

We ran, on me and Andres machine, the following two commands:

pip install -U git+https://github.com/pypa/pipenv.git@1afd341a9318f011ac31db3c5367058d65aa4db
cd [into our project]
pipenv --version 
pipenv, version 2023.9.8
pipenv install git+https://github.com/pypa/pipenv.git@1afd341a9318f011ac31db3c5367058d65aa4db
pipenv --version
pipenv, version 2023.9.9.dev0

At this point, we established a baseline for pipenv.

We commit a “potatoes 2” print to our package on the dev branch and run pipenv update, we see that the commit ref has been updated successfully but no change in the files under our virtual env specifically (/Users/joao.carlos/.local/share/virtualenvs/package-5xV1os6e/src/package-name/module/file.py

We tried a bunch of variations and none worked.

We did however manage to get it updating by adding the editable=true to the Pipfile.

With editable=true, we see both the change in ref and the change in the file.

Does this help with debugging the issue?

I saw your reply, but I cannot reproduce it, so leaving it open for now in case someone can help you.