Closed giosava94 closed 4 months ago
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Tested with the new async code (merge in rc/5.3.0) and it works just fine.
So I will merge this into a temp branch (rc/5.3.0-pre), so I can merge it back into the actual release candidate branch. This is because I otherwise need to just copy paste your code as the async and sync codebases are now split, and you won't be seen as a contributor anywhere :-)
Hi all,
first for all, thanks for your work and for keeping up to date this library!
I'm using
neomodel
in a FastAPI project to update a neo4j database. For each endpoint reading or writing to the database, I open a new DB transaction using the decoratorswrite_transaction
andread_transaction
.Since I'm using multiple wrappers from different libraries for each endpoint, I noticed that the
TransactionProxy
__init__
and__call__
functions were called when creating the endpoint, but thewrapper
defined in__call__
and the__enter__
and__exit__
functions were not invoked.This pull request adds the
functools
wraps
function to thatwrapper
. Doing this I resolved the problem described before.I executed the tests with pytest and they passed. I also noticed that the behavior with easier use cases does not change.
Let me know if this change introduces breaking changes or strange behavior (hopefully not).
Regards