Version
The installed PUM version is exposed at the package root, following PEP 396.
import pum
pum.__version__ # str, e.g. "1.7.2"
pum.VERSION # packaging.version.Version, convenient for comparisons
pum.VERSION is a parsed packaging.version.Version
object, which is useful for programmatic comparisons:
The CLI exposes the same value via:
Resolution order
The version is resolved at import time using the first source available:
- A bundled
pum-*.dist-info/METADATAdirectory next to thepumpackage. This ensures the reported version always matches the code being executed, even when PUM is vendored inside another package and a differentpumhappens to be installed elsewhere onsys.path. git describe --tags --always --dirtywhen running from a source checkout.importlib.metadata.version("pum")for a regular installed package."0.0.0"as an ultimate fallback.