lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.45k stars 445 forks source link

Get werkzeug version using importlib #591

Closed Sparrow0hawk closed 8 months ago

Sparrow0hawk commented 10 months ago

Resolves deprecation warning:

.venv/lib/python3.11/site-packages/authlib/integrations/flask_oauth2/errors.py:4: DeprecationWarning: The '__version__' attribute is deprecated and will be removed in Werkzeug 3.1. Use feature detection or 'importlib.metadata.version("werkzeug")' instead.
    _version = werkzeug.__version__.split('.')[0]

DO NOT SEND ANY SECURITY FIX HERE. Please read "Security Reporting" section on README.

What kind of change does this PR introduce? (check at least one)

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

(If no, please delete the above question and this text message.)


lepture commented 9 months ago

@Sparrow0hawk tests failed.

Sparrow0hawk commented 9 months ago

@lepture please retry, should be fixed.

azmeuk commented 8 months ago

@lepture could there be a 1.2.2 hotfix for this? As the deprecation warning is emitted at the module level, the simple presence of authlib makes it noisy.

lepture commented 8 months ago

@azmeuk 1.3.0 released

azmeuk commented 8 months ago

Thank you @lepture Did you publish it on pypi? I cannot see 1.3 yet. https://pypi.org/project/Authlib/#history

lepture commented 8 months ago

@azmeuk published on pypi