New submission from cowlinator <cowlina...@gmail.com>:
If `importlib.metadata.version` can't find the distribution version, it seems to return the result of a local `git describe`. I don't know if this is git-specific, or which other SCMs this might try to interact with. The result of `importlib.metadata.version` varies depending on whether the local directory happens to be a git repo. This is unexpected and undocumented. Based on the documentation, I expected that when it couldn't find the distribution version, it would ALWAYS raise and exception or return nothing. In order to properly document this, you'll have to figure out all of the SCMs that it might interact with. ---------- assignee: docs@python components: Documentation messages: 412227 nosy: cowlinator, docs@python priority: normal severity: normal status: open title: [doc] Undocumented behavior of importlib.metadata.version type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46595> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com