19.0 vanilla

This commit is contained in:
Ernad Husremovic 2025-10-03 18:07:25 +02:00
parent 0a7ae8db93
commit 991d2234ca
416 changed files with 646602 additions and 300844 deletions

View file

@ -0,0 +1,20 @@
def patch_module():
try:
from xlrd import xlsx # noqa: PLC0415
except ImportError:
xlsx = None
else:
from lxml import etree # noqa: PLC0415
# xlrd.xlsx supports defusedxml, defusedxml's etree interface is broken
# (missing ElementTree and thus ElementTree.iter) which causes a fallback to
# Element.getiterator(), triggering a warning before 3.9 and an error from 3.9.
#
# Historically we had defusedxml installed because zeep had a hard dep on
# it. They have dropped it as of 4.1.0 which we now require (since 18.0),
# but keep this patch for now as Odoo might get updated in a legacy env
# which still has defused.
#
# Directly instruct xlsx to use lxml as we have a hard dependency on that.
xlsx.ET = etree
xlsx.ET_has_iterparse = True
xlsx.Element_has_iter = True