with a regular SA engine-level Connection, you can get at the psycopg2
connection via conn.connection. the connection and cursor returned by
cursor() are proxied for garbage collection/connection pool purposes
but call upon the psycopg2 API for their behavior and methods.
you also want to make sure you revert any isolation level settings on
the connection back to normal before returning it to the pool.
or, as an alternative to that, you can call the detach() method on
either Connection or the proxied connection, which will remove it from
the pool; it gets closed for real when you close() it and whatever
changes you've made on it don't pollute the overall pool of
connections.