[FIX] core: ignore usage of html parser for ofx files

The ofxparse module explicitly uses an html parser instead of xml but
since bs4 4.11.0, this triggers a warning.

closes odoo/odoo#113354

X-original-commit: e81ed97c9c54c69c68c54c69b4d3d80ed0515ae8
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
Christophe Monniez
2023-02-22 12:43:00 +01:00
parent 4bfe69d00d
commit bc15040c8e
+7
View File
@@ -148,6 +148,13 @@ def init_logger():
warnings.filterwarnings('ignore', r'^Sampling from a set', category=DeprecationWarning, module='odoo')
# https://github.com/urllib3/urllib3/issues/2680
warnings.filterwarnings('ignore', r'^\'urllib3.contrib.pyopenssl\' module is deprecated.+', category=DeprecationWarning)
# ofxparse use an html parser to parse ofx xml files and triggers a warning since bs4 4.11.0
# https://github.com/jseutter/ofxparse/issues/170
try:
from bs4 import XMLParsedAsHTMLWarning
warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)
except ImportError:
pass
# ignore a bunch of warnings we can't really fix ourselves
for module in [
'babel.util', # deprecated parser module, no release yet