summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/events.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-07-08 13:39:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-07-08 13:39:56 -0400
commit02a81707dc8b7c4d69551cad195fb16ca6955df1 (patch)
treefeda05ad7e0ce7bef057b9ee9d55d3273d8d008a /lib/sqlalchemy/events.py
parentdb68ecff12f790fd129f03b8676b317fa17e5f28 (diff)
downloadsqlalchemy-02a81707dc8b7c4d69551cad195fb16ca6955df1.tar.gz
- create a new system where we can decorate an event method
with @_legacy_signature, will inspect incoming listener functions to see if they match an older signature, will wrap into a newer sig - add an event listen argument named=True, will send all args as kw args so that event listeners can be written with **kw, any combination of names - add a doc system to events that writes out the various calling styles for a given event, produces deprecation messages automatically. a little concerned that it's a bit verbose but will look at it up on RTD for awhile to get a feel. - change the calling signature for bulk update/delete events - we have the BulkUD object right there, and there's at least six or seven things people might want to see, so just send the whole BulkUD in [ticket:2775]
Diffstat (limited to 'lib/sqlalchemy/events.py')
-rw-r--r--lib/sqlalchemy/events.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py
index 7f11232ac..4fb997b9c 100644
--- a/lib/sqlalchemy/events.py
+++ b/lib/sqlalchemy/events.py
@@ -70,6 +70,8 @@ class DDLEvents(event.Events):
"""
+ _target_class_doc = "SomeSchemaClassOrObject"
+
def before_create(self, target, connection, **kw):
"""Called before CREATE statments are emitted.
@@ -266,6 +268,8 @@ class PoolEvents(event.Events):
"""
+ _target_class_doc = "SomeEngineOrPool"
+
@classmethod
def _accept_with(cls, target):
if isinstance(target, type):
@@ -443,6 +447,8 @@ class ConnectionEvents(event.Events):
"""
+ _target_class_doc = "SomeEngine"
+
@classmethod
def _listen(cls, target, identifier, fn, retval=False):
target._has_events = True
@@ -753,7 +759,7 @@ class ConnectionEvents(event.Events):
:param conn: :class:`.Connection` object
"""
- def savepoint(self, conn, name=None):
+ def savepoint(self, conn, name):
"""Intercept savepoint() events.
:param conn: :class:`.Connection` object