summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/dynamic.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2022-05-03 20:24:20 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2022-05-03 20:24:20 +0000
commit0cb54010d86493168cc763b836c0a71429b26c1b (patch)
tree583b489242564e78efe0b2519723e094b057ea14 /lib/sqlalchemy/orm/dynamic.py
parent675c3e17f7fcccb7534c46adb56529fc3ddd8dbf (diff)
parent1fa3e2e3814b4d28deca7426bb3f36e7fb515496 (diff)
downloadsqlalchemy-0cb54010d86493168cc763b836c0a71429b26c1b.tar.gz
Merge "pep484: attributes and related" into main
Diffstat (limited to 'lib/sqlalchemy/orm/dynamic.py')
-rw-r--r--lib/sqlalchemy/orm/dynamic.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py
index 63a37d0da..1b4f573b5 100644
--- a/lib/sqlalchemy/orm/dynamic.py
+++ b/lib/sqlalchemy/orm/dynamic.py
@@ -64,7 +64,9 @@ class DynaLoader(strategies.AbstractRelationshipLoader):
)
-class DynamicAttributeImpl(attributes.AttributeImpl):
+class DynamicAttributeImpl(
+ attributes.HasCollectionAdapter, attributes.AttributeImpl
+):
uses_objects = True
default_accepts_scalar_loader = False
supports_population = False
@@ -120,11 +122,11 @@ class DynamicAttributeImpl(attributes.AttributeImpl):
@util.memoized_property
def _append_token(self):
- return attributes.Event(self, attributes.OP_APPEND)
+ return attributes.AttributeEventToken(self, attributes.OP_APPEND)
@util.memoized_property
def _remove_token(self):
- return attributes.Event(self, attributes.OP_REMOVE)
+ return attributes.AttributeEventToken(self, attributes.OP_REMOVE)
def fire_append_event(
self, state, dict_, value, initiator, collection_history=None