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

Poetry install not remove old dist-info in venv #4498

Closed
2 of 3 tasks
jean-helsinki opened this issue Sep 11, 2021 · 2 comments
Closed
2 of 3 tasks

Poetry install not remove old dist-info in venv #4498

jean-helsinki opened this issue Sep 11, 2021 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@jean-helsinki
Copy link

  • 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 20.04.3 LTS
  • Poetry version: 1.1.8

Issue

After bump version in pyproject.toml and execute poetry install poetry not remove old dist-info folder from project venv:

ls ~/.cache/pypoetry/virtualenvs/poetry-bug-w3pEPh55-py3.8/lib/python3.8/site-packages/poetry_bug*
/home/user/.cache/pypoetry/virtualenvs/poetry-bug-w3pEPh55-py3.8/lib/python3.8/site-packages/poetry_bug.pth

/home/user/.cache/pypoetry/virtualenvs/poetry-bug-w3pEPh55-py3.8/lib/python3.8/site-packages/poetry_bug-0.1.0.dist-info:
INSTALLER  METADATA  RECORD

/home/user/.cache/pypoetry/virtualenvs/poetry-bug-w3pEPh55-py3.8/lib/python3.8/site-packages/poetry_bug-0.1.1.dist-info:
INSTALLER  METADATA  RECORD

This affect pkg_resources (and maybe other package utils) module behavior - pkg_resources.get_distribution(module_name) can take incorrect version for project.

pyproject.toml for reproduce bug is very basic:

[tool.poetry]
name = "poetry_bug"
version = "0.1.1"
description = ""
authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]
pytest = "^5.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
@jean-helsinki jean-helsinki added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 11, 2021
@finswimmer
Copy link
Member

Hello @jean-helsinki,

this was reported earlier in #2855 and is fixed in the current preview release (1.2.0a2).

fin swimmer

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants