]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Fixed a regression regarding the :meth:`.MapperEvents.instrument_class`
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Apr 2015 22:22:41 +0000 (18:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Apr 2015 22:22:41 +0000 (18:22 -0400)
commit6c0f30db81d127920ca7a68d7a28b8ea086866b6
tree25b3149fbe4a419d6af3f5767c87dc19320456f3
parentd48acff23bc04dafa958e76ef2ff614aa8d6751b
- Fixed a regression regarding the :meth:`.MapperEvents.instrument_class`
event where its invocation was moved to be after the class manager's
instrumentation of the class, which is the opposite of what the
documentation for the event explicitly states.  The rationale for the
switch was due to Declarative taking the step of setting up
the full "instrumentation manager" for a class before it was mapped
for the purpose of the new ``@declared_attr`` features
described in :ref:`feature_3150`, but the change was also made
against the classical use of :func:`.mapper` for consistency.
However, SQLSoup relies upon the instrumentation event happening
before any instrumentation under classical mapping.
The behavior is reverted in the case of classical and declarative
mapping, the latter implemented by using a simple memoization
without using class manager.
fixes #3388
doc/build/changelog/changelog_10.rst
lib/sqlalchemy/ext/declarative/api.py
lib/sqlalchemy/ext/declarative/base.py
lib/sqlalchemy/orm/mapper.py
test/ext/declarative/test_basic.py
test/orm/test_events.py