This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kkirsche-github
Recipients kkirsche-github
Date 2022-02-17.01:41:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645062095.18.0.489026763345.issue46774@roundup.psfhosted.org>
In-reply-to
Content
When using importlib.metadata.version with tools such as poetry which may install the current package one or more times, importlib.metadata.version is not deterministic in returning the latest version of the package, instead returning the first one located.

As it's unclear if this behavior is desired by importlib, I'm creating this issue to determine if this is intentional behavior or a bug.

I have opened the following poetry issue:
* https://github.com/python-poetry/poetry/issues/5204

I have also created the following reproduction repository for the installation issue:
https://github.com/kkirsche/poetry-remove-untracked

When the after is modified to return the version, it returns the first one found (e.g. if you go 3.0.0 -> 3.0.1 -> 3.0.2, each would be installed and the library would return 3.0.0 to the caller)

Thank you for your time and consideration. I apologize if this is not something that requires action by the Python team.

I'd be open to trying to submit a PR, but want to verify whether this is intentional or not.
History
Date User Action Args
2022-02-17 01:41:35kkirsche-githubsetrecipients: + kkirsche-github
2022-02-17 01:41:35kkirsche-githubsetmessageid: <1645062095.18.0.489026763345.issue46774@roundup.psfhosted.org>
2022-02-17 01:41:35kkirsche-githublinkissue46774 messages
2022-02-17 01:41:34kkirsche-githubcreate