You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: