Closed attilavetesi-epam closed 1 month ago
Hi, @attilavetesi-epam,
Could you please review the following PR: https://github.com/antonrh/anydi/pull/103/files and validate the behavior in the prepatch version https://pypi.org/project/anydi/0.26.8a0/?
I tested the fix version on my existing projects and found no issues. Closing for now, but I'm ready to fix anything if you find something
Exception is not delegated to resource managers
If an exception happens while a resource is being used, the exception is not delegated to the context manager of the resource, thus preventing the manager to take the appropriate action.
This is especially important for cases where a DB session has to be committed / rolled back based on the outcome of the operations.
Example runnable snippet:
Output:
(Resource committed instead of rolled back.)