summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/events.py')
-rw-r--r--lib/sqlalchemy/events.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py
index 5eb84a156..11d3402c5 100644
--- a/lib/sqlalchemy/events.py
+++ b/lib/sqlalchemy/events.py
@@ -9,6 +9,7 @@
from . import event
from . import exc
+from . import util
from .engine import Connectable
from .engine import Dialect
from .engine import Engine
@@ -749,6 +750,13 @@ class ConnectionEvents(event.Events):
"""
+ @util.deprecated(
+ "0.9",
+ "The :meth:`.ConnectionEvents.dbapi_error` "
+ "event is deprecated and will be removed in a future release. "
+ "Please refer to the :meth:`.ConnectionEvents.handle_error` "
+ "event.",
+ )
def dbapi_error(
self, conn, cursor, statement, parameters, context, exception
):
@@ -792,11 +800,6 @@ class ConnectionEvents(event.Events):
:param exception: The **unwrapped** exception emitted directly from the
DBAPI. The class here is specific to the DBAPI module in use.
- .. deprecated:: 0.9 - The :meth:`.ConnectionEvents.dbapi_error`
- event is deprecated and will be removed in a future release.
- Please refer to the :meth:`.ConnectionEvents.handle_error`
- event.
-
"""
def handle_error(self, exception_context):