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

--remove-untracked does not remove old versions of root package #5204

Closed
3 tasks done
kkirsche opened this issue Feb 16, 2022 · 9 comments
Closed
3 tasks done

--remove-untracked does not remove old versions of root package #5204

kkirsche opened this issue Feb 16, 2022 · 9 comments
Labels
status/duplicate Duplicate issues

Comments

@kkirsche
Copy link
Contributor

  • 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: macOS Catalina 10.15.7 (19H1715)

  • Poetry version: Poetry version 1.1.13

  • Link of a Gist with the contents of your pyproject.toml file: https://github.com/kkirsche/poetry-remove-untracked

    • This is a full repo with a before and after tag with reproduction steps in the README.md

Issue

I expect the --remove-untracked flag to remove versions of the root package that no longer match the pyproject.toml file.

By not removing these files, if the project uses importlib.metadata.version, this will return an incorrect version number even though the pip installation is aware that a later version is the newest.

@kkirsche kkirsche added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 16, 2022
@jclerman
Copy link

I encountered this exact issue earlier this week. Not clear if the described effect on importlib_metadata (or importlib.metadata, depending on the Python version) should also be considered a bug in that library - but regardless, making --remove--untracked behave as requested would make its results more deterministic, which is a Good Thing.

@kkirsche
Copy link
Contributor Author

I encountered this exact issue earlier this week. Not clear if the described effect on importlib_metadata (or importlib.metadata, depending on the Python version) should also be considered a bug in that library - but regardless, making --remove--untracked behave as requested would make its results more deterministic, which is a Good Thing.

I’ve filed https://bugs.python.org/issue46774 To understand if they consider this a bug in the upstream Python language.

@finswimmer
Copy link
Member

Hello,

this is a duplicate of #3289, which is already solved by #3900

fin swimmer

@finswimmer finswimmer added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 22, 2022
@kkirsche
Copy link
Contributor Author

When will this be in the released poetry version if it was already solved?

@jaraco
Copy link

jaraco commented Mar 13, 2022

Looks like it's included with 1.2.0a1 and later.

@AlexAurand
Copy link

@jaraco Is there a tentative release date for poetry 1.2?

@jaraco
Copy link

jaraco commented Mar 31, 2022

I don't maintain this project; I hope someone else knows.

@AlexAurand
Copy link

@finswimmer Is there a tentative release date for poetry 1.2?

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
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

5 participants