]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add before_mapper_configured event
authorChris Wilson <chris+github@qwirx.com>
Mon, 10 Dec 2018 21:37:51 +0000 (16:37 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Dec 2018 03:31:21 +0000 (22:31 -0500)
commit65ea042302693492cbaee96dfed5e9337e0d96a4
tree5faf860067f6360e8d049b3aa09817aa1e8ed0df
parent0d4c0c1a279525e09659e21488348718743c33f9
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
doc/build/changelog/unreleased_13/4397.rst [new file with mode: 0644]
lib/sqlalchemy/event/registry.py
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/events.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/mapper.py
test/orm/test_events.py