From 76aff7b7744329b9ef83882eec8dd0b287a691bc Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 5 Mar 2021 08:10:47 +0000 Subject: [PATCH] [FIX] core: avoid astroid imp module deprecation warning The astroid package where version is lower than 2.5.1 uses imports the `imp` module that was deprecated in python 3.4 [0]. In Debian buster, astroid version is 2.1.0 and 2.3.3 in Ubuntu Focal. With this commit, the deprecation warning is filtered out. Note that pylint 2.5 avoid that deprecated import [1], that's the reason why the warning was not showing on current runbot Docker image. [0] https://docs.python.org/3/library/imp.html [1] https://github.com/PyCQA/pylint/commit/51c646bf70a6e0a86492bfd2ddd1885671d64d67 closes odoo/odoo#67469 X-original-commit: 8127bea147c093aa64ac7d31ebc69e4dcbef6eef Signed-off-by: Christophe Monniez (moc) --- odoo/netsvc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/netsvc.py b/odoo/netsvc.py index adf373b060d..8f39d4e4dd2 100644 --- a/odoo/netsvc.py +++ b/odoo/netsvc.py @@ -136,6 +136,7 @@ def init_logger(): 'zeep.loader',# zeep using defusedxml.lxml '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) ]: warnings.filterwarnings('ignore', category=DeprecationWarning, module=module)