]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Remove obsolete references to Transaction.Rollback
authorDaniel Fortunov <github@danielfortunov.com>
Mon, 23 Nov 2020 08:08:46 +0000 (08:08 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 23 Nov 2020 15:06:11 +0000 (15:06 +0000)
Rollback exception is no longer available on the Transaction object.

psycopg3/psycopg3/connection.py

index 0d8bfe4c8ebe6d3c6c542235a7a4d24136c24a5a..df6f264ca28d8cdbcf03b1ca7ec9fa5a26111cf9 100644 (file)
@@ -313,7 +313,7 @@ class Connection(BaseConnection):
             if self._savepoints:
                 raise e.ProgrammingError(
                     "Explicit rollback() forbidden within a Transaction "
-                    "context. (Either raise Transaction.Rollback() or allow "
+                    "context. (Either raise Rollback() or allow "
                     "an exception to propagate out of the context.)"
                 )
             if self.pgconn.transaction_status == TransactionStatus.IDLE:
@@ -472,7 +472,7 @@ class AsyncConnection(BaseConnection):
             if self._savepoints:
                 raise e.ProgrammingError(
                     "Explicit rollback() forbidden within a Transaction "
-                    "context. (Either raise Transaction.Rollback() or allow "
+                    "context. (Either raise Rollback() or allow "
                     "an exception to propagate out of the context.)"
                 )
             await self._exec_command(b"rollback")