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

[20.2 regression] Redownloads old version of already-installed package from the package index #8667

Closed
inducer opened this issue Jul 31, 2020 · 1 comment
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@inducer
Copy link

inducer commented Jul 31, 2020

Environment

  • pip version: 20.2
  • Python version: Python 3.8.5 (default, Jul 20 2020, 18:32:44) (from Debian)
  • OS: Debian Linux testing

Description

Run this script, first with the "broken" line uncommented, then again with the "OK" line uncommented:

#! /bin/bash

set -e
# set -x

ENVNAME=my-repro-env
BUILDNAME=my-repro-build

rm -Rf "$ENVNAME"
rm -Rf "$BUILDNAME"
rm -Rf $HOME/.cache/pip

python3 -m venv "$ENVNAME"
source "$ENVNAME"/bin/activate

python -m pip install "pip==20.2"

python -m pip install "git+https://github.com/inducer/loopy#egg=loo.py"
mkdir "$BUILDNAME"
(cd "$BUILDNAME" && git clone https://github.com/inducer/meshmode.git && cd meshmode && git checkout 91e0bef382a77b47c4f5d7761a25c39463ec4a24 )

# broken: redownloads old "loo.py" from PyPI
(cd "$BUILDNAME/meshmode"; pip install .)

# OK: accepts existing loo.py
# (cd "$BUILDNAME/meshmode"; python setup.py install)

(:warning: CAUTION! Deletes pip cache for repeatability, although that seems nonessential to the behavior.)

Expected Behavior

The git version of loo.py remains installed after pip install .. This is what pip used to do, and also what the setup.py install code path does.

Observed Behavior

An old, stale version of loo.py is downloaded from the package index, which replaces the new, already-present version installed from git:

Processing /home/andreas/tmp/my-repro-build/meshmode
Collecting gmsh_interop
  Downloading gmsh_interop-2019.1.tar.gz (12 kB)
Collecting loo.py>=2014.1
  Downloading loo.py-2017.2.tar.gz (414 kB)
     |████████████████████████████████| 414 kB 1.4 MB/s 
Collecting modepy
  Downloading modepy-2016.1.2.tar.gz (419 kB)
     |████████████████████████████████| 419 kB 3.6 MB/s 
Requirement already satisfied: numpy in /home/andreas/tmp/my-repro-env/lib/python3.8/site-packages (from meshmode==2020.2) (1.19.1)
(SNIP)
Requirement already satisfied: pycparser in /home/andreas/tmp/my-repro-env/lib/python3.8/site-packages (from cffi>=1.1.0->islpy>=2016.2->loo.py>=2014.1->meshmode==2020.2) (2.20)
Using legacy 'setup.py install' for meshmode, since package 'wheel' is not installed.
Using legacy 'setup.py install' for gmsh-interop, since package 'wheel' is not installed.
Using legacy 'setup.py install' for loo.py, since package 'wheel' is not installed.
Using legacy 'setup.py install' for modepy, since package 'wheel' is not installed.
Installing collected packages: gmsh-interop, loo.py, modepy, scipy, recursivenodes, meshmode
    Running setup.py install for gmsh-interop ... done
    Running setup.py install for loo.py ... done
    Running setup.py install for modepy ... done
    Running setup.py install for meshmode ... done
Successfully installed gmsh-interop-2019.1 loo.py-2020.2 meshmode-2020.2 modepy-2016.1.2 recursivenodes-0.1.0 scipy-1.5.2

Entertainingly, after all this, pip remains confused over what version of loo.py is installed:

$ source my-repro-env/bin/activate 
(my-repro-env) $ pip freeze | grep loo
loo.py==2020.2
@uranusjr
Copy link
Member

Duplicate to #8645.

@uranusjr uranusjr added the resolution: duplicate Duplicate of an existing issue/PR label Jul 31, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jul 31, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants