summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2018-12-10 16:37:51 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2018-12-10 22:31:21 -0500
commit65ea042302693492cbaee96dfed5e9337e0d96a4 (patch)
tree5faf860067f6360e8d049b3aa09817aa1e8ed0df /lib/sqlalchemy/event
parent0d4c0c1a279525e09659e21488348718743c33f9 (diff)
downloadsqlalchemy-65ea042302693492cbaee96dfed5e9337e0d96a4.tar.gz
Add before_mapper_configured event
This event is intended to allow a specific mapper to be skipped during the configure step, by returning a value of `.orm.interfaces.EXT_SKIP` which means the mapper will be skipped within this configure run. The "new mappers" flag will remain set in this case and the configure operation will occur again. This event, and its return value, make it possible to query one base while a different one still needs configuration, which cannot be completed at this time. Fixes: #4397 Change-Id: I122e556f6a4ff842ad15315dcf39e19bb7f9a744 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4403
Diffstat (limited to 'lib/sqlalchemy/event')
-rw-r--r--lib/sqlalchemy/event/registry.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/event/registry.py b/lib/sqlalchemy/event/registry.py
index 758230487..8d4bada0b 100644
--- a/lib/sqlalchemy/event/registry.py
+++ b/lib/sqlalchemy/event/registry.py
@@ -225,7 +225,7 @@ class _EventKey(object):
return self._key in _key_to_collection
def base_listen(self, propagate=False, insert=False,
- named=False):
+ named=False, retval=None):
target, identifier, fn = \
self.dispatch_target, self.identifier, self._listen_fn