Skip to content
Snippets Groups Projects
Commit 8133363d authored by Christophe Monniez's avatar Christophe Monniez
Browse files

[FIX] core: ignore invalid escape sequence in 3.10

Since Python 3.10, the invalid escape sequence warning use quotes to
display the invalid sequence. Because of that, the filter does not catch
it anymore.

With this commit, they are caught in all supported versions.

Part-of: odoo/odoo#98081
parent 91e7e7ec
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ def init_logger():
warnings.filterwarnings('default', category=DeprecationWarning)
# 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)
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment