PYTHONOPTIMIZE=1 and asserts #459
Unanswered
hhgabelgaard
asked this question in
Doodba - The image
Replies: 1 comment
-
Good question. I opened odoo/documentation#1278 to see if Odoo can clarify it. Because actually ignoring assertions is common practice. But as many times happen, maybe Odoo has its own practice... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
Thanks for a great project
Doodba set PYTHONOPTIMIZE=1 and as I understand that turns asserts statements into NOP's
But the Odoo core is sprinkled with asserts statements
E.g in ir_mail_server.py https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/models/ir_mail_server.py#L482
where the purpose is:
partners with missing/invalid emails must not halt notifications to others
odoo/odoo@2fb2d9f
How do You run without this kind of tests? We see mail notifications not been sent - I mean, an email address could be deleted from a partner, that does not remove them as followers
Or am I on a wrong trail in my hunt for the missing notifications?
And is PYTHONOPTIMIZE=0 a valid solution ?
BR
Beta Was this translation helpful? Give feedback.
All reactions