[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) <moc@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user