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
Modern packaging metadata provides a standard way to get the version of any package. Flask and other Pallets projects will be deprecating the __version__ attribute. Instead, use importlib.metadata.version if the version is needed (or use feature detection). This will work regardless of what version is installed.
It looks like your Pyramid integration already does this, might be worth it to use the standard consistently across all integrations.
Solution Brainstorm
Replace from flask import __version__ as FLASK_VERSION with FLASK_VERSION = importlib.metadata.version("flask"). Possibly replace all __version__ imports.
The text was updated successfully, but these errors were encountered:
Problem Statement
Modern packaging metadata provides a standard way to get the version of any package. Flask and other Pallets projects will be deprecating the
__version__
attribute. Instead, useimportlib.metadata.version
if the version is needed (or use feature detection). This will work regardless of what version is installed.It looks like your Pyramid integration already does this, might be worth it to use the standard consistently across all integrations.
Solution Brainstorm
Replace
from flask import __version__ as FLASK_VERSION
withFLASK_VERSION = importlib.metadata.version("flask")
. Possibly replace all__version__
imports.The text was updated successfully, but these errors were encountered: