Outdated metadata after version bump for local package
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: Ubuntu 18.04.1
-
Poetry version: 1.1.4
-
Python version: I tested this in the following python environments:
- 3.7.5 (using
importlib_metadata
) - 3.8.0
- 3.8.6
- 3.7.5 (using
-
Link of a Gist with the contents of your pyproject.toml file:
Issue
When I build and install my package, bump the version, then build and install again, the metadata of the package is not always showing the right version, but an older version number. It works for the first version bump, but fails for further.
I am not sure whether this is doe to the way poetry installs the package, or whether this is a bug in importlib
.
Step 1: Bump the version
$ poetry version patch
Bumping version from 0.1.1 to 0.1.2
Step 2: Build and install the package
$ poetry install -vvv --no-dev
...
Installing the current project: pi (0.1.2)
- Building package pi in editable mode
- Adding pi.pth to /tmp/test/folder/env/lib/python3.8/site-packages for /tmp/test/folder
- Adding the pi-0.1.2.dist-info directory to /tmp/test/folder/env/lib/python3.8/site-packages
Step 3: Check the metadata
$ python -c "from importlib.metadata import version; print(version('pi'))"
0.1.1
This should be 0.1.2
, not 0.1.1
.
To reproduce this, please have a look at the gist.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (10 by maintainers)
Looks like #3900 will fix this.
@peldszus Looks to me like this piece of code would delete a pre-existing
dist-info
for the exact same version number. It does not seem to be looking fordist-info
with different version numbers (lower or higher).