Skip to content

Commit

Permalink
Merge pull request #591 from Sparrow0hawk/patch-2
Browse files Browse the repository at this point in the history
 Get werkzeug version using importlib
  • Loading branch information
lepture committed Dec 17, 2023
2 parents 04e83f6 + ac58322 commit 2d66702
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion authlib/integrations/flask_oauth2/errors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import importlib

import werkzeug
from werkzeug.exceptions import HTTPException

_version = werkzeug.__version__.split('.')[0]
_version = importlib.metadata.version('werkzeug').split('.')[0]

if _version in ('0', '1'):
class _HTTPException(HTTPException):
Expand Down

0 comments on commit 2d66702

Please sign in to comment.