]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
TypeDecorator passes "outer" flag to itself for set_parent accounting
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 29 Mar 2021 21:57:20 +0000 (17:57 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 30 Mar 2021 14:00:58 +0000 (10:00 -0400)
commit3d284bb1010996ef204c85a2141446e47d048dac
tree60edea427f0c4eda150c0772ba5e7a3a5b594195
parent2c2e01a0c6d0847f5648fd0120c8fa0bd5f6268f
TypeDecorator passes "outer" flag to itself for set_parent accounting

Fixed bug first introduced in as some combination of :ticket:`2892`,
:ticket:`2919` nnd :ticket:`3832` where the attachment events for a
:class:`_types.TypeDecorator` would be doubled up against the "impl" class,
if the "impl" were also a :class:`_types.SchemaType`. The real-world case
is any :class:`_types.TypeDecorator` against :class:`_types.Enum` or
:class:`_types.Boolean` would get a doubled
:class:`_schema.CheckConstraint` when the ``create_constraint=True`` flag
is set.

Fixes: #6152
Change-Id: I3218b7081297270c132421f6765b5c3673d10a5c
doc/build/changelog/unreleased_13/6152.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/type_api.py
test/sql/test_metadata.py
test/sql/test_types.py