From 1393eac44c49299e733a5181f387ba140aaa3e44 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 19 Feb 2018 16:59:42 -0500 Subject: Implement remove() for _empty_collection Fixed regression caused in 1.2.3 due to fix from :ticket:`4181` where the changes to the event system involving :class:`.Engine` and :class:`.OptionEngine` did not accommodate for event removals, which would raise an ``AttributeError`` when invoked at the class level. Change-Id: I1c9083829d74dd710716d28b0eaca4fa15e86313 Fixes: #4190 --- lib/sqlalchemy/event/attr.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/event/attr.py b/lib/sqlalchemy/event/attr.py index efa8fab42..c33ec82ff 100644 --- a/lib/sqlalchemy/event/attr.py +++ b/lib/sqlalchemy/event/attr.py @@ -54,6 +54,9 @@ class _empty_collection(object): def extend(self, other): pass + def remove(self, element): + pass + def __iter__(self): return iter([]) -- cgit v1.2.1