matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Use attempt_to_set_autocommit everywhere. #16615

Closed clokep closed 11 months ago

clokep commented 11 months ago

This is pulled from my psycopg3 branch, it uses attempt_to_set_autocommit instead of an assert isinstance(conn, psycopg2.extensions.connection) followed by directly setting the autocommit.

tl;dr we're just being a bit more generic.