Skip to content

Commit

Permalink
Get werkzeug version using importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparrow0hawk committed Nov 21, 2023
1 parent eea8c61 commit ac58322
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 ac58322

Please sign in to comment.