at master 22 lines 706 B view raw
1diff --git a/odoo/http.py b/odoo/http.py 2index f26dd52db235c..9689fc894b2b1 100644 3--- a/odoo/http.py 4+++ b/odoo/http.py 5@@ -117,6 +117,7 @@ 6 import glob 7 import hashlib 8 import hmac 9+import importlib.metadata 10 import inspect 11 import json 12 import logging 13@@ -256,7 +257,7 @@ def get_default_session(): 14 'alias', 'host', 'methods', 15 } 16 17-if parse_version(werkzeug.__version__) >= parse_version('2.0.2'): 18+if parse_version(importlib.metadata.version('werkzeug')) >= parse_version('2.0.2'): 19 # Werkzeug 2.0.2 adds the websocket option. If a websocket request 20 # (ws/wss) is trying to access an HTTP route, a WebsocketMismatch 21 # exception is raised. On the other hand, Werkzeug 0.16 does not 22