sangkyoonnam commented on PR #950:
URL: https://github.com/apache/burr/pull/950#issuecomment-6462191922

   @skrawcz fair point on supplied connections. In d9a56b3c, 
`PostgreSQLPersister` takes `manage_transactions`, default `False`. With 
`False`, a connection passed to the constructor keeps `main`'s transaction 
behavior: reads neither commit nor roll back, `save` commits on success, and a 
failed call leaves the rollback to the caller. `from_values`, and through it 
`from_config`, pass `True` because they open the connection, and so does the 
deprecated `postgresql.PostgreSQLPersister.from_values`. Cursors are closed in 
both modes.
   
   Two new tests cover supplied connections. One runs `load`, `list_app_ids` 
and `is_initialized` with uncommitted caller work, checks that work after each 
call, then checks that the transaction is still open and that the caller's 
rollback removes the work. The other checks that a failed `save` and a failed 
`load` leave the aborted transaction to the caller. Both pass on `main` and 
fail on the previous head, b2985097. The cursor test now runs in both modes, 
and a persister pickled before this change unpickles with 
`manage_transactions=False`. I rewrote the release-notes paragraph under Notes 
to match.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to