Skip to content

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

Closed

Description

@kkirsche
  • 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.

Activity

  1. added
    kind/bug
    status/triage
    on Feb 16, 2022
  2. jclerman commented on Feb 16, 2022

    @jclerman

    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.

  3. kkirsche commented on Feb 17, 2022

    @kkirsche
    ContributorAuthor

    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.

  4. finswimmer commented on Feb 22, 2022

    @finswimmer
    Member

    Hello,

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

    fin swimmer

  5. added
    status/duplicate
    and removed
    kind/bug
    status/triage
    on Feb 22, 2022
  6. kkirsche commented on Feb 22, 2022

    @kkirsche
    ContributorAuthor

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

  7. jaraco commented on Mar 13, 2022

    @jaraco

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

  8. AlexAurand commented on Mar 31, 2022

    @AlexAurand

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

  9. jaraco commented on Mar 31, 2022

    @jaraco

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

  10. AlexAurand commented on Apr 6, 2022

    @AlexAurand

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

  11. github-actions commented on Mar 2, 2024

    @github-actions

    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.

  12. locked as resolved and limited conversation to collaborators on Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions