From 25567ff92ba3fc9a2ae10b66e64c0b5b79fc6164 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Wed, 28 Apr 2021 06:29:38 +0000 Subject: [PATCH] [FIX] core: avoid deprecation warning in requests_toolbelt The requests_toolbelt package < 0.9 uses `from collections import ...` which is deprecated in python 3.8 [0]. The request_toolbelt package is not a dependency of Odoo but is needed by zeep [1]. Unfortunately, the Ubuntu python3-requests-toolbelt package is still 0.8 [2]. This commit filters out the warning. [0] https://github.com/requests/toolbelt/commit/979f95266c2044893b05cb2314e94c899915748c [1] https://packages.ubuntu.com/focal/python3-zeep [2] https://packages.ubuntu.com/focal/python3-requests-toolbelt closes odoo/odoo#71056 X-original-commit: 91dd6171dac567e5f0185e53982ede3b166cfe7c Signed-off-by: Christophe Monniez (moc) Signed-off-by: Xavier Morel (xmo) --- odoo/netsvc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/netsvc.py b/odoo/netsvc.py index 8ef13038cbe..c9b4cd36818 100644 --- a/odoo/netsvc.py +++ b/odoo/netsvc.py @@ -138,6 +138,7 @@ def init_logger(): 'reportlab.lib.rl_safe_eval',# reportlab importing ABC from collections 'ofxparse',# ofxparse importing ABC from collections 'astroid', # deprecated imp module (fixed in 2.5.1) + 'requests_toolbelt', # importing ABC from collections (fixed in 0.9) ]: warnings.filterwarnings('ignore', category=DeprecationWarning, module=module)