diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-03-13 11:05:57 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-03-19 09:32:21 +0000 |
| commit | fe376d50d0c6da332a5ea2540c95583931dd2203 (patch) | |
| tree | a718fde95743556c759eac61c61b00a53308540a /odoo/netsvc.py | |
| parent | 41822a5022dea39a24018d1fa62644be399f7d5f (diff) | |
[FIX] core, base: leftover deprecation warnings
* from collections import <ABC> is deprecated, unclear why the
deprecation warning didn't appear before (possibly only appears in
3.7/3.8?) either way `collections.abc` should be 3.3+ so switch
everything to it.
* add some more ignores on third-party packages deprecation
warnings (meh)
* while at it, mitigate generation of non-breaking space on some
versions of Babel (in the french locale used by our tests anyway)
closes odoo/odoo#47581
Related: odoo/enterprise#9214
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/netsvc.py')
| -rw-r--r-- | odoo/netsvc.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/odoo/netsvc.py b/odoo/netsvc.py index 8257dccdbcb..b731eb347bd 100644 --- a/odoo/netsvc.py +++ b/odoo/netsvc.py @@ -138,10 +138,14 @@ def init_logger(): # ignore deprecation warnings from invalid escape (there's a ton and it's # pretty likely a super low-value signal) warnings.filterwarnings('ignore', r'^invalid escape sequence \\.', category=DeprecationWarning) - # ignore warning from older setuptools version using imp - warnings.filterwarnings('ignore', category=DeprecationWarning, module='setuptools.depends') - # ignore warning from zeep using defusedxml.lxml - warnings.filterwarnings('ignore', category=DeprecationWarning, module='zeep.loader') + # ignore a bunch of warnings we can't really fix ourselves + for module in [ + 'setuptools.depends',# older setuptools version using imp + 'zeep.loader',# zeep using defusedxml.lxml + 'reportlab.lib.rl_safe_eval',# reportlab importing ABC from collections + 'xlrd/xlsx',# xlrd mischecks iter() on trees or something so calls deprecated getiterator() instead of iter() + ]: + warnings.filterwarnings('ignore', category=DeprecationWarning, module=module) from .tools.translate import resetlocale resetlocale() |
