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.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py
index fe9c5dda1..6435ff3f2 100644
--- a/lib/sqlalchemy/events.py
+++ b/lib/sqlalchemy/events.py
@@ -279,8 +279,8 @@ class PoolEvents(event.Events):
"""
-class EngineEvents(event.Events):
- """Available events for :class:`.Engine`.
+class ConnectionEvents(event.Events):
+ """Available events for :class:`.Connection`.
The methods here define the name of an event as well as the names of members that are passed to listener functions.
@@ -307,12 +307,7 @@ class EngineEvents(event.Events):
@classmethod
def _listen(cls, target, identifier, fn, retval=False):
- from sqlalchemy.engine.base import Connection, \
- _listener_connection_cls
- if target.Connection is Connection:
- target.Connection = _listener_connection_cls(
- Connection,
- target.dispatch)
+ target._has_events = True
if not retval:
if identifier == 'before_execute':