New submission from Kevin Kirsche :
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.
--
components: Library (Lib)
messages: 413375
nosy: kkirsche2
priority: normal
severity: normal
status: open
title: Importlib.metadata.version picks first distribution not latest
type: behavior
versions: Python 3.10
___
Python tracker
<https://bugs.python.org/issue46774>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com