]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Track SchemaEventTarget types in as_mutable()
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 30 Mar 2017 21:52:10 +0000 (17:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 30 Mar 2017 21:52:56 +0000 (17:52 -0400)
commit502a46b64e0434332132af244f76cf834140508e
treeaa338c3a2c3280657bc3d4c43804ee6f4f78f98f
parent23585b842cc31b6866447f444fb43794af31cda9
Track SchemaEventTarget types in as_mutable()

Fixed bug in :mod:`sqlalchemy.ext.mutable` where the
:meth:`.Mutable.as_mutable` method would not track a type that had
been copied using :meth:`.TypeEngine.copy`.  This became more of
a regression in 1.1 compared to 1.0 because the :class:`.TypeDecorator`
class is now a subclass of :class:`.SchemaEventTarget`, which among
other things indicates to the parent :class:`.Column` that the type
should be copied when the :class:`.Column` is.  These copies are
common when using declarative with mixins or abstract classes.

Change-Id: Ib04df862c58263185dbae686c548fea3e12c46f1
Fixes: #3950
(cherry picked from commit 07b63894cb8ff9529b406f196b5d7cb9af209e9e)
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/ext/mutable.py
test/ext/test_mutable.py