3838 PayloadCodec ,
3939 PayloadConverter ,
4040 SerializationContext ,
41- WithSerializationContext ,
4241 WorkflowSerializationContext ,
4342)
4443from temporalio .exceptions import ApplicationError
@@ -66,9 +65,7 @@ class TraceData:
6665 items : list [TraceItem ] = field (default_factory = list )
6766
6867
69- class SerializationContextPayloadConverter (
70- EncodingPayloadConverter , WithSerializationContext
71- ):
68+ class SerializationContextPayloadConverter (EncodingPayloadConverter ):
7269 def __init__ (self ):
7370 self .context : Optional [SerializationContext ] = None
7471
@@ -133,9 +130,7 @@ def from_payload(
133130 return value
134131
135132
136- class SerializationContextCompositePayloadConverter (
137- CompositePayloadConverter , WithSerializationContext
138- ):
133+ class SerializationContextCompositePayloadConverter (CompositePayloadConverter ):
139134 def __init__ (self ):
140135 super ().__init__ (
141136 SerializationContextPayloadConverter (),
@@ -1000,7 +995,7 @@ async def run(self) -> Never:
1000995test_traces : dict [str , list [TraceItem ]] = defaultdict (list )
1001996
1002997
1003- class FailureConverterWithContext (DefaultFailureConverter , WithSerializationContext ):
998+ class FailureConverterWithContext (DefaultFailureConverter ):
1004999 def __init__ (self ):
10051000 super ().__init__ (encode_common_attributes = False )
10061001 self .context : Optional [SerializationContext ] = None
@@ -1131,7 +1126,7 @@ async def test_failure_converter_with_context(client: Client):
11311126# Test payload codec
11321127
11331128
1134- class PayloadCodecWithContext (PayloadCodec , WithSerializationContext ):
1129+ class PayloadCodecWithContext (PayloadCodec ):
11351130 def __init__ (self ):
11361131 self .context : Optional [SerializationContext ] = None
11371132 self .encode_called_with_context = False
@@ -1432,7 +1427,7 @@ async def test_child_workflow_codec_with_context(client: Client):
14321427# Payload codec: test decode context matches encode context
14331428
14341429
1435- class PayloadEncryptionCodec (PayloadCodec , WithSerializationContext ):
1430+ class PayloadEncryptionCodec (PayloadCodec ):
14361431 """
14371432 The outbound data for encoding must always be the string "outbound". "Encrypt" it by replacing
14381433 it with a key that is derived from the context available during encoding. On decryption, assert
@@ -1597,7 +1592,7 @@ async def test_decode_context_matches_encode_context(
15971592# Test nexus payload codec
15981593
15991594
1600- class AssertNexusLacksContextPayloadCodec (PayloadCodec , WithSerializationContext ):
1595+ class AssertNexusLacksContextPayloadCodec (PayloadCodec ):
16011596 def __init__ (self ):
16021597 self .context = None
16031598
@@ -1679,9 +1674,7 @@ class PydanticData(BaseModel):
16791674 trace : List [str ] = []
16801675
16811676
1682- class PydanticJSONConverterWithContext (
1683- PydanticJSONPlainPayloadConverter , WithSerializationContext
1684- ):
1677+ class PydanticJSONConverterWithContext (PydanticJSONPlainPayloadConverter ):
16851678 def __init__ (self ):
16861679 super ().__init__ ()
16871680 self .context : Optional [SerializationContext ] = None
@@ -1700,7 +1693,7 @@ def to_payload(self, value: Any) -> Optional[temporalio.api.common.v1.Payload]:
17001693 return super ().to_payload (value )
17011694
17021695
1703- class PydanticConverterWithContext (CompositePayloadConverter , WithSerializationContext ):
1696+ class PydanticConverterWithContext (CompositePayloadConverter ):
17041697 def __init__ (self ):
17051698 super ().__init__ (
17061699 * (
@@ -1758,9 +1751,7 @@ class UserMethodCalledError(Exception):
17581751 pass
17591752
17601753
1761- class CustomEncodingPayloadConverter (
1762- JSONPlainPayloadConverter , WithSerializationContext
1763- ):
1754+ class CustomEncodingPayloadConverter (JSONPlainPayloadConverter ):
17641755 @property
17651756 def encoding (self ) -> str :
17661757 return "custom-encoding-that-does-not-clash-with-default-converters"
0 commit comments