summaryrefslogtreecommitdiff
path: root/odoo/netsvc.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-11-26 07:05:14 +0000
committerXavier Morel <xmo@odoo.com>2020-11-27 09:36:32 +0000
commit648635deca67df09417ae55c6eb181c98524b74d (patch)
tree9bb2bc4c2ac549757cfabe55f83da6863ee114fd /odoo/netsvc.py
parentd8254c130d4b04a0f1ff80990fe28e795bf9ad51 (diff)
[IMP] requirements: resolve compatibility issues for 3.8 and 3.9
Only updates outdated requirements which actively cause issues: * freezegun broken in 3.8 (removal of time.clock) * xlrd broken in 3.8 (removal of time.clock) * also monkeypatches xlrd.xlsx for 3.9 (removal of Element.getiterator, breaks because of defusedxml) * jinja triggers DeprecationWarning in 3.8 * pillow triggers warning in 3.9 * lxml, greenlet don't compile in 3.9 * reportlab doesn't work in 3.9 New versions try to match those of Debian Bullseye. Also adds a script to more easily compare dependency versions between the requirements files and what's in various distributions (currently supports checking against debian and ubuntu). Furthermore updates warnings filtering: * removes xlrd (mischeck was monkeypatched as noted above) * removes setuptools (was for older versions, one would hope this isn't an issue anymore) * adds babel: python-babel/babel#684 fixes the deprecation warning but is not part of any release yet * ignores error related to `random.sample` on a set, this is a diagnostics bug because recordsets implement both Sequence and Set, and the stdlib checks for Set first (bpo-42470) See #59980 Closes #61103 closes odoo/odoo#62380 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/netsvc.py')
-rw-r--r--odoo/netsvc.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/netsvc.py b/odoo/netsvc.py
index 3d6910d06dd..5d2c7cd0395 100644
--- a/odoo/netsvc.py
+++ b/odoo/netsvc.py
@@ -128,12 +128,13 @@ 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)
+ # recordsets are both sequence and set so trigger warning despite no issue
+ warnings.filterwarnings('ignore', r'^Sampling from a set', category=DeprecationWarning, module='odoo')
# ignore a bunch of warnings we can't really fix ourselves
for module in [
- 'setuptools.depends',# older setuptools version using imp
+ 'babel.util', # deprecated parser module, no release yet
'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()
'ofxparse',# ofxparse importing ABC from collections
]:
warnings.filterwarnings('ignore', category=DeprecationWarning, module=module)