question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipfile.lock changes local editable dependency to VCS

See original GitHub issue
  1. I have defined my project as editable in Pipfile with myproject = {path=".", editable=true}.
  2. Without an initial Pipfile.lock and an existing virtualenv, pipenv install generates a Pipfile.lock with
"myproject": {
    "editable": true,
    "path": "."
},
  1. Running pipenv lock now changes the Pipfile.lock to:
    "myproject": {
        "editable": true,
-       "path": "."
+       "git": "git@github.com:xxxxx/myproject.git@xxxxxxxxxxxxxxxxxxx"
    },
Expected result

The Pipfile.lock shouldn’t have changed.

Describe your environment

Pipenv version: 8.3.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
gsakkiscommented, Dec 20, 2017

Why was this closed?

1reaction
baxencommented, Apr 23, 2018

@techalchemy I found this thread while investigating the same issue. Below I’ve included a minimal example that I was going to post in case it helps, but I can confirm though that this is fixed by the refactor you linked to. Thanks for the solution and excited to see it go live 😁

The original post I had for reference:

git clone https://github.com/Suor/funcy.git
cd funcy

Using this Pipfile:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]
"e1839a8" = {path = ".", editable = true}
toolz = {git = "https://github.com/pytoolz/toolz.git"}

[requires]
python_version = "2.7"

If the virtual environment is completely clean (e.g. after running pipenv --rm), then pipenv lock will create a lock with the local install of funcy and a VCS install of toolz, as desired.

But once I actually install and then redo the lock

pipenv install
pipenv lock

only then does it add this entry to Pipfile.lock:

        "funcy": {
            "editable": true,
            "git": "https://github.com/Suor/funcy.git",
            "ref": "aa9dac86244313b47cfeff1918e076b1e0bf7776"
        },

This results in plenty of other issues depending on individual setups. Like @hnykda mentioned above it can cause problems with private repos, and it also can cause unfortunate issues when rebasing in git if the ref is deleted. I also find that this can lead to local edits to the code being ignored inside the virtualenv.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Usage of Pipenv - Read the Docs
lock ¶. Pipfiles contain information for the dependencies of the project, and supersedes the requirements.txt file used in most Python projects. You should...
Read more >
Basic Usage of Pipenv
$ pipenv lock is used to create a Pipfile.lock , which declares all dependencies (and sub-dependencies) of your project, their latest available versions,...
Read more >
pipenv Documentation - manpages.ubuntu!
Generates and checks file hashes for locked dependencies. • Automatically install required Pythons, if pyenv is available. • Automatically finds your project ...
Read more >
pipenv Documentation
It also generates the ever-important Pipfile.lock, which is used to ... VCS Refs for locked local editable dependencies will now update ...
Read more >
pipenv-setup - PyPI
A beautiful python package development tool: sync dependencies in Pipfile or Pipfile.lock to setup.py . Never need again to change dependencies manually in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found