]> git.ipfire.org Git - thirdparty/psycopg.git/commit
refactor: drop _try_cancel internal method.
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 10 Apr 2024 20:16:47 +0000 (22:16 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Apr 2024 22:10:44 +0000 (00:10 +0200)
commit46f661dbbc30808d11a71c0ae7bbfc8245b6fd42
treec1dabcb240d48c076e1a853c485432d8b56996bf
parent3cf2829f99417307c639bb91cf51b1180797b409
refactor: drop _try_cancel internal method.

This method was useful before introducing cancel_safe, which is now the
function of choice for internal cancelling.

Also refactor the exception handling to account for possible errors in
`PGcancel.cancel()`, not only in `PGconn.get_cancel()`, to make sure to
not clobber an exception bubbling up with ours, whatever happens to the
underlying connection.
docs/api/connections.rst
psycopg/psycopg/_connection_base.py