Skip to content

Commit f8c5ede

Browse files
committed
Use object identity comparison semantics
1 parent e64c15e commit f8c5ede

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
@@ -425,14 +425,14 @@ def from_payloads(
425425
def with_context(self, context: SerializationContext) -> Self:
426426
"""Return a new instance with context set on the component converters.
427427
428-
If none of the component converters support with_context, return self.
428+
If none of the component converters returned new instances, return self.
429429
"""
430430
converters: list[EncodingPayloadConverter] = []
431431
any_with_context = False
432432
for c in self.converters.values():
433433
if isinstance(c, WithSerializationContext):
434434
converters.append(c.with_context(context))
435-
any_with_context = True
435+
any_with_context = converters[-1] != c
436436
else:
437437
converters.append(c)
438438

0 commit comments

Comments
 (0)