Files
nixpkgs/pkgs/by-name/od/odoo16/fix-test.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

23 lines
706 B
Diff

diff --git a/odoo/http.py b/odoo/http.py
index f26dd52db235c..9689fc894b2b1 100644
--- a/odoo/http.py
+++ b/odoo/http.py
@@ -117,6 +117,7 @@
import glob
import hashlib
import hmac
+import importlib.metadata
import inspect
import json
import logging
@@ -256,7 +257,7 @@ def get_default_session():
'alias', 'host', 'methods',
}
-if parse_version(werkzeug.__version__) >= parse_version('2.0.2'):
+if parse_version(importlib.metadata.version('werkzeug')) >= parse_version('2.0.2'):
# Werkzeug 2.0.2 adds the websocket option. If a websocket request
# (ws/wss) is trying to access an HTTP route, a WebsocketMismatch
# exception is raised. On the other hand, Werkzeug 0.16 does not