]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Expire memoizations on setattr/delattr, check in delattr
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 9 Jul 2018 22:24:12 +0000 (18:24 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 9 Jul 2018 22:24:12 +0000 (18:24 -0400)
commitf34f634824da18a71f3c898a2e19e19e5f26bede
tree43c07ea44f5e05c2b17f139258c9cd135ff4a38d
parent941143858ba949c3a4a2dfcc5cd710ae6d4146e1
Expire memoizations on setattr/delattr, check in delattr

Fixed bug where declarative would not update the state of the
:class:`.Mapper` as far as what attributes were present, when additional
attributes were added or removed after the mapper attribute collections had
already been called and memoized.  Addtionally, a ``NotImplementedError``
is now raised if a fully mapped attribute (e.g. column, relationship, etc.)
is deleted from a class that is currently mapped, since the mapper will not
function correctly if the attribute has been removed.

Change-Id: Idaca8e0237b31aa1d6564d94c3a179d7dc6b5df9
Fixes: #4133
doc/build/changelog/unreleased_13/4133.rst [new file with mode: 0644]
lib/sqlalchemy/ext/declarative/api.py
lib/sqlalchemy/ext/declarative/base.py
lib/sqlalchemy/orm/mapper.py
test/ext/declarative/test_basic.py