Skip to content

Commit f85a643

Browse files
committed
Revert "AI fix for"
This reverts commit 09584f8.
1 parent b165b9c commit f85a643

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

temporalio/converter.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -435,21 +435,6 @@ def __init__(self) -> None:
435435
"""Create a default payload converter."""
436436
super().__init__(*DefaultPayloadConverter.default_encoding_payload_converters)
437437

438-
def with_context(self, context: SerializationContext) -> Self:
439-
"""Return a new instance with the given context, preserving the class type."""
440-
# Create a new instance of the same class (works for subclasses too)
441-
instance = self.__class__()
442-
# Update the converters with context
443-
instance.converters = {
444-
encoding: (
445-
converter.with_context(context)
446-
if isinstance(converter, WithSerializationContext)
447-
else converter
448-
)
449-
for encoding, converter in self.converters.items()
450-
}
451-
return instance
452-
453438

454439
class BinaryNullPayloadConverter(EncodingPayloadConverter):
455440
"""Converter for 'binary/null' payloads supporting None values."""

temporalio/worker/_workflow_instance.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,12 @@ def __init__(self, det: WorkflowInstanceDetails) -> None:
225225
self._workflow_input: Optional[ExecuteWorkflowInput] = None
226226
self._info = det.info
227227
self._context_free_payload_codec = det.data_converter.payload_codec
228-
self._context_free_payload_converter = det.data_converter.payload_converter
229-
self._context_free_failure_converter = det.data_converter.failure_converter
228+
self._context_free_payload_converter = (
229+
det.data_converter.payload_converter_class()
230+
)
231+
self._context_free_failure_converter = (
232+
det.data_converter.failure_converter_class()
233+
)
230234
self._payload_converter, self._failure_converter = (
231235
self._converters_with_context(
232236
temporalio.converter.WorkflowSerializationContext(

0 commit comments

Comments
 (0)