Replying to myself to update my own thoughts: I think __version__ and packaging tools answer separate questions.
__version__ answers the question of "this module I imported, what version is it". The packaging tools answer the question "what dependency does this distribution satisfy". This mismatch is why importlib.metadata.version("bs4") doesn't return a useful answer. A single distribution might even install multiple top-level modules with different versions. Schiavo, Simon _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/O242SRB6SBLBBMPCOLCKURBEXXHUSJZN/ Code of Conduct: http://python.org/psf/codeofconduct/