Closed
Description
The __version__
attribute is an old pattern from early in Python packaging. Setuptools eventually made it easier to use the pattern by allowing reading the value from the attribute at build time, and some other build backends have done the same.
However, there's no reason to expose this directly in code anymore. It's usually easier to use feature detection (hasattr
, try/except
) instead. importlib.metadata.version("werkzeug")
can be used to get the version at runtime in a standard way, if it's really needed.
Metadata
Metadata
Assignees
Labels
No labels