Skip to content

Outdated metadata after version bump for local package #3289

@peldszus

Description

@peldszus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions