Daily updates from Odoo
Tuesday, November 5, 2019
1 change
Code cleanup and technical improvements
This update removes an old compatibility helper that is no longer needed and simplifies how internal errors are re-raised. It should make the codebase easier to maintain while preserving existing error behavior for users and administrators.
Original PR description
@Elkasitu @rco-odoo pycompat.reraise had few callsites, and for most `reraise` is needless complexity since P3 chains exceptions by default. There is one callsite where things are a bit less trivial, but I think removing reraise still makes things *better* (nb: reraising the exception object itself also works but see commit messages for rationale, and note that per its original comment _handle_exception can be called from outside of an `except` block which is why a plain `raise` doesn't work). Also removed unused `collections` import and outdated comment from pycompat.