Skip to content

Pipenv install ignores updates to VCS (Git) branch/tag in 'ref' #4387

Closed
@carderm

Description

Following the instructions here and migrating from a requirements.txt file, I have created a Pipfile to install a dependency from VCS (Git).

[packages]
my_app = {editable = true, git = "https://{git_token}@github.com/my-git/my-app", ref = "v1.0.1"}

Issue description

When running: pipenv install --skip-lock and the install was successfully run previously:

  • Issue 1: does not update the VCS (Git) dependency to the new ref (branch/tag) version
  • Issue 2: completely ignores the ref value - i.e. ref = "THIS SHOULD ERROR" is compleletly ignored

Expected result

Running install for editable dependency should install or update to the specified ref (branch/tag) or error if missing/unavailable.

Actual result

  • Result 1: Run pipenv install --skip-lock with a new valid ref (branch/tag):

    • Ran successfully, no errors, however no installation of specified version.

    Installing dependencies from Pipfile… ================================ 0/0 - 00:00:00

  • Result 2: Run pipenv install --skip-lock with an invalid ref (branch/tag) - i.e. ref = "THIS SHOULD ERROR" :

    • Ran successfully, no errors, however no installation of specified version.
    Installing dependencies from Pipfile…
      ================================ 0/0 - 00:00:00
    
  • Result 3: uninstall selected app first, then run pipenv install --skip-lock

    • Ran successfully, correct installation of specified version.
    Installing dependencies from Pipfile…
      ================================ 1/1 - 00:01:29
    

Steps to replicate

  1. Create Pipfile with VCS dependency that has a specific app version e.g. django:

    [[source]]
    name = "pypi"
    url = "https://pypi.org/simple"
    verify_ssl = true
    
    [dev-packages]
    
    [packages]
    django = {editable = true, git = "https://github.com/django/django", ref = "2.2.13"}
    
    [requires]
    python_version = "3.8"
    
  2. Run pipenv install --skip-lock to install django 2.2.13

  3. Change the ref = "3.0.8" then run pipenv install --skip-lock - there will be no change

  4. Change the ref = "SURELY.THIS.WILL.ERROR" then run pipenv install --skip-lock - there will be no error and no change


Pipenv version: '2020.6.2'

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions