vimalloc / flask-jwt-extended

An open source Flask extension that provides JWT support (with batteries included)!
http://flask-jwt-extended.readthedocs.io/en/stable/
MIT License
1.56k stars 239 forks source link

DeprecationWarning: The '__version__' attribute is deprecated and will be removed in Flask 3.1 #542

Closed yctomwang closed 10 months ago

yctomwang commented 10 months ago

Hi @vimalloc, thank you for such an awesome libarary! I have downloaded the code to playaround with it, however when i run pytest on the unit tests its showing a Deprecation warning. I will propose a quick PR to fix this if you dont mind! Thank you once again! ================================================================================ warnings summary ================================================================================= tests/test_config.py:7 tests/test_config.py:7 /Users/yuanchenwang/Desktop/flask-jwt-extended/tests/test_config.py:7: DeprecationWarning: The 'version' attribute is deprecated and will be removed in Flask 3.1. Use feature detection or 'importlib.metadata.version("flask")' instead. from flask import version as flask_version

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

image

vimalloc commented 10 months ago

Thanks for the report and the fix!