summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2021-03-05 08:10:47 +0000
committerChristophe Monniez <moc@odoo.com>2021-03-05 13:29:57 +0000
commit8127bea147c093aa64ac7d31ebc69e4dcbef6eef (patch)
treea5cf95eea13ef7ff9b7eaa459a543ed256d7fd97 /odoo
parentc081a50a3b25dd456760e717cd916ea9550997a5 (diff)
[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#67308 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'odoo')
-rw-r--r--odoo/netsvc.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/netsvc.py b/odoo/netsvc.py
index 5d2c7cd0395..a59cf3482cd 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)