Skip to content

Commit 2448f7f

Browse files
committed
Use object identity comparison semantics
1 parent 8e728cc commit 2448f7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

temporalio/converter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,14 @@ def from_payloads(
421421
def with_context(self, context: SerializationContext) -> Self:
422422
"""Return a new instance with context set on the component converters.
423423
424-
If none of the component converters support with_context, return self.
424+
If none of the component converters returned new instances, return self.
425425
"""
426426
converters: list[EncodingPayloadConverter] = []
427427
any_with_context = False
428428
for c in self.converters.values():
429429
if isinstance(c, WithSerializationContext):
430430
converters.append(c.with_context(context))
431-
any_with_context = True
431+
any_with_context = converters[-1] != c
432432
else:
433433
converters.append(c)
434434

0 commit comments

Comments
 (0)