pydantic copy is deprecated in favor of model_copy

This commit is contained in:
Benedikt Bartscher 2024-03-01 15:08:59 +01:00
parent 37c360e786
commit 45cb36f59a
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -1854,7 +1854,7 @@ class MemoizationLeaf(Component):
"""
comp = super().create(*children, **props)
if comp.get_hooks():
comp._memoization_mode = cls._memoization_mode.copy(
comp._memoization_mode = cls._memoization_mode.model_copy(
update={"disposition": MemoizationDisposition.ALWAYS}
)
return comp

View File

@ -125,7 +125,7 @@ class EventActionsMixin(Base):
Returns:
New EventHandler-like with stopPropagation set to True.
"""
return self.copy(
return self.model_copy(
update={"event_actions": {"stopPropagation": True, **self.event_actions}},
)
@ -136,7 +136,7 @@ class EventActionsMixin(Base):
Returns:
New EventHandler-like with preventDefault set to True.
"""
return self.copy(
return self.model_copy(
update={"event_actions": {"preventDefault": True, **self.event_actions}},
)