o
    iD                    @  s  d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddlmZmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) ddl*Z+ddl,Z+ddl-Z+ddl.Z+ddl/Z/ddl0Z0ddl0m1Z1 ddl2Z3ddl4Z3ddl5Z3ddl6Z3ddl7Z3ddl8Z3ddl9Z3e	j:dk rddl;m<Z< e	j:dkrddlm=Z= e	j:dkrddl>m?Z? ee@ZAG dd deZBeddG dd deBZCeddG dd deCZDeddG dd deCZEG dd deZFG dd deZGG dd  d eZHG d!d" d"eGeFZIG d#d$ d$eIZJG d%d& d&eHZKG d'd( d(eHZLe+jMjNO ZPG d)d* d*eHZQG d+d, d,eHZRG d-d. d.ejSZTG d/d0 d0eHZUe!d1eVZWG d2d3 d3eZXG d4d5 d5eZYG d6d7 d7eZZG d8d9 d9eZZ[G d:d; d;e[Z\eddG d<d= d=eFZ]eK eL eQ eR eU feJ_^e] e]__e]j_j`eG__e]j_jaeZ__dmd?d@Z_dndFdGZbdodMdNZcdpdQdRZddqdWdXZedrdZd[Zfdsd]d^Zgdtd`daZhdudddeZig fdvdkdlZjdS )wz7Base converter and implementations for data conversion.    )annotationsN)ABCabstractmethod)	dataclass)datetime)IntEnum)zip_longest)	getLogger)Any	AwaitableCallableClassVarDictListLiteralMappingNewTypeOptionalSequenceTupleTypeTypeVarUnionget_type_hintsoverload)Self      parser)StrEnumr   
   )	UnionTypec                   @     e Zd ZdZdS )SerializationContexta  Base serialization context.

    Provides contextual information during serialization and deserialization operations.

    Examples:
        In client code, when starting a workflow, or sending a signal/update/query to a workflow,
        or receiving the result of an update/query, or handling an exception from a workflow, the
        context type is :py:class:`WorkflowSerializationContext` and the workflow ID set of the
        target workflow will be set in the context.

        In workflow code, when operating on a payload being sent/received to/from a child workflow,
        or handling an exception from a child workflow, the context type is
        :py:class:`WorkflowSerializationContext` and the workflow ID is that of the child workflow,
        not of the currently executing (i.e. parent) workflow.

        In workflow code, when operating on a payload to be sent/received to/from an activity, the
        context type is :py:class:`ActivitySerializationContext` and the workflow ID is that of the
        currently-executing workflow. ActivitySerializationContext is also set on data converter
        operations in the activity context.
    N__name__
__module____qualname____doc__ r,   r,   Z/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/temporalio/converter.pyr&   F   s    r&   T)frozenc                   @  s"   e Zd ZU dZded< ded< dS ) BaseWorkflowSerializationContextzRBase serialization context shared by workflow and activity serialization contexts.str	namespaceworkflow_idNr(   r)   r*   r+   __annotations__r,   r,   r,   r-   r/   _   s   
 r/   c                   @  r%   )WorkflowSerializationContexta  Serialization context for workflows.

    See :py:class:`SerializationContext` for more details.

    Attributes:
        namespace: The namespace the workflow is running in.
        workflow_id: The ID of the workflow. Note that this is the ID of the workflow of which the
            payload being operated on is an input or output. Note also that when creating/describing
            schedules, this may be the workflow ID prefix as configured, not the final workflow ID
            when the workflow is created by the schedule.
    Nr'   r,   r,   r,   r-   r5   g   s    r5   c                   @  s2   e Zd ZU dZded< ded< ded< ded< dS )	ActivitySerializationContexta?  Serialization context for activities.

    See :py:class:`SerializationContext` for more details.

    Attributes:
        namespace: Workflow/activity namespace.
        workflow_id: Workflow ID. Note, when creating/describing schedules,
            this may be the workflow ID prefix as configured, not the final workflow ID when the
            workflow is created by the schedule.
        workflow_type: Workflow Type.
        activity_type: Activity Type.
        activity_task_queue: Activity task queue.
        is_local: Whether the activity is a local activity.
    r0   workflow_typeactivity_typeactivity_task_queueboolis_localNr3   r,   r,   r,   r-   r6   x   s   
 r6   c                   @  s   e Zd ZdZd	ddZdS )
WithSerializationContextaX  Interface for classes that can use serialization context.

    The following classes may implement this interface:
    - :py:class:`PayloadConverter`
    - :py:class:`PayloadCodec`
    - :py:class:`FailureConverter`
    - :py:class:`EncodingPayloadConverter`

    During data converter operations (encoding/decoding, serialization/deserialization, and failure
    conversion), instances of classes implementing this interface will be replaced by the result of
    calling with_context(context). This allows overridden methods (encode/decode,
    to_payload/from_payload, etc) to use the context.
    contextr&   returnr   c                 C  s   t  )zReturn a copy of this object configured to use the given context.

        Args:
            context: The serialization context to use.

        Returns:
            A new instance configured with the context.
        NotImplementedError)selfr=   r,   r,   r-   with_context   s   	z%WithSerializationContext.with_contextNr=   r&   r>   r   )r(   r)   r*   r+   rB   r,   r,   r,   r-   r<      s    r<   c                   @  s   e Zd ZU dZded< 	 ed&dd	Ze	
d'd(ddZd)ddZd*ddZ	d+ddZ
ed,ddZed-d#dZ	
d'd.d%dZd
S )/PayloadConverterz8Base payload converter to/from multiple payloads/values.zClassVar[PayloadConverter]defaultvaluesSequence[Any]r>   &List[temporalio.api.common.v1.Payload]c                 C     t )a  Encode values into payloads.

        Implementers are expected to just return the payload for
        :py:class:`temporalio.common.RawValue`.

        Args:
            values: Values to be converted.

        Returns:
            Converted payloads. Note, this does not have to be the same number
            as values given, but must be at least one and cannot be more than
            was given.

        Raises:
            Exception: Any issue during conversion.
        r?   rA   rF   r,   r,   r-   to_payloads   s   zPayloadConverter.to_payloadsNpayloads*Sequence[temporalio.api.common.v1.Payload]
type_hintsOptional[List[Type]]	List[Any]c                 C  rI   )a  Decode payloads into values.

        Implementers are expected to treat a type hint of
        :py:class:`temporalio.common.RawValue` as just the raw value.

        Args:
            payloads: Payloads to convert to Python values.
            type_hints: Types that are expected if any. This may not have any
                types if there are no annotations on the target. If this is
                present, it must have the exact same length as payloads even if
                the values are just "object".

        Returns:
            Collection of Python values. Note, this does not have to be the same
            number as values given, but at least one must be present.

        Raises:
            Exception: Any issue during conversion.
        r?   rA   rL   rN   r,   r,   r-   from_payloads   s   zPayloadConverter.from_payloads!temporalio.api.common.v1.Payloadsc                 C  s   t jjjj| |dS )zf:py:meth:`to_payloads` for the
        :py:class:`temporalio.api.common.v1.Payloads` wrapper.
        rL   )
temporalioapicommonv1PayloadsrK   rJ   r,   r,   r-   to_payloads_wrapper   s   z$PayloadConverter.to_payloads_wrapper+Optional[temporalio.api.common.v1.Payloads]c                 C  s   |r|j sg S | |j S )zh:py:meth:`from_payloads` for the
        :py:class:`temporalio.api.common.v1.Payloads` wrapper.
        )rL   rR   rA   rL   r,   r,   r-   from_payloads_wrapper   s   
z&PayloadConverter.from_payloads_wrappervaluer
    temporalio.api.common.v1.Payloadc                 C  s   |  |gd S )a  Convert a single value to a payload.

        This is a shortcut for :py:meth:`to_payloads` with a single-item list
        and result.

        Args:
            value: Value to convert to a single payload.

        Returns:
            Single converted payload.
        r   )rK   rA   r^   r,   r,   r-   
to_payload   s   zPayloadConverter.to_payloadpayloadc                 C     d S Nr,   )rA   rb   r,   r,   r-   from_payload  s   zPayloadConverter.from_payload	type_hintType[temporalio.types.AnyType]temporalio.types.AnyTypec                 C  rc   rd   r,   rA   rb   rf   r,   r,   r-   re     s   Optional[Type]c                 C  s"   |  |g|r|gd S dd S )aT  Convert a single payload to a value.

        This is a shortcut for :py:meth:`from_payloads` with a single-item list
        and result.

        Args:
            payload: Payload to convert to value.
            type_hint: Optional type hint to say which type to convert to.

        Returns:
            Single converted value.
        Nr   )rR   ri   r,   r,   r-   re     s   "rF   rG   r>   rH   rd   rL   rM   rN   rO   r>   rP   rF   rG   r>   rS   )rL   r[   r>   rP   )r^   r
   r>   r_   )rb   r_   r>   r
   )rb   r_   rf   rg   r>   rh   rb   r_   rf   rj   r>   r
   )r(   r)   r*   r+   r4   r   rK   rR   rZ   r]   ra   r   re   r,   r,   r,   r-   rD      s$   
 



	rD   c                   @  sB   e Zd ZdZeedddZedd	d
Ze	ddddZdS )EncodingPayloadConverterzgBase converter to/from single payload/value with a known encoding for use in CompositePayloadConverter.r>   r0   c                 C  rI   )z3Encoding for the payload this converter works with.r?   rA   r,   r,   r-   encoding"  s   z!EncodingPayloadConverter.encodingr^   r
   *Optional[temporalio.api.common.v1.Payload]c                 C  rI   )a  Encode a single value to a payload or None.

        Args:
            value: Value to be converted.

        Returns:
            Payload of the value or None if unable to convert.

        Raises:
            TypeError: Value is not the expected type.
            ValueError: Value is of the expected type but otherwise incorrect.
            RuntimeError: General error during encoding.
        r?   r`   r,   r,   r-   ra   (     z#EncodingPayloadConverter.to_payloadNrb   r_   rf   rj   c                 C  rI   )a*  Decode a single payload to a Python value or raise exception.

        Args:
            payload: Payload to convert to Python value.
            type_hint: Type that is expected if any. This may not have a type if
                there are no annotations on the target.

        Return:
            The decoded value from the payload. Since the encoding is checked by
            the caller, this should raise an exception if the payload cannot be
            converted.

        Raises:
            RuntimeError: General error during decoding.
        r?   ri   r,   r,   r-   re   9  s   z%EncodingPayloadConverter.from_payloadr>   r0   r^   r
   r>   rr   rd   rn   )	r(   r)   r*   r+   propertyr   rq   ra   re   r,   r,   r,   r-   ro     s    ro   c                   @  sj   e Zd ZU dZded< d#ddZd#d	d
Zd$ddZ	d%d&ddZd'ddZ	d(ddZ
ejd)d!d"ZdS )*CompositePayloadConvertera  Composite payload converter that delegates to a list of encoding payload converters.

    Encoding/decoding are attempted on each payload converter successively until
    it succeeds.

    Attributes:
        converters: List of payload converters to delegate to, in order.
    z(Mapping[bytes, EncodingPayloadConverter]
convertersro   r>   Nonec                 G  s   | j |  dS )z|Initializes the data converter.

        Args:
            converters: Payload converters to delegate to, in order.
        N)_set_convertersrA   rx   r,   r,   r-   __init__]  s   z"CompositePayloadConverter.__init__c                 G  s   dd |D | _ d S )Nc                 S  s   i | ]}|j  |qS r,   )rq   encode.0cr,   r,   r-   
<dictcomp>f  s    z=CompositePayloadConverter._set_converters.<locals>.<dictcomp>)rx   r{   r,   r,   r-   rz   e  s   z)CompositePayloadConverter._set_convertersrF   rG   rH   c                 C  s   g }t |D ]:\}}d}t|tjjr|j}n| j D ]}||}|dur) nq|du r;t	d| dt
| d|| q|S )zEncode values trying each converter.

        See base class. Always returns the same number of payloads as values.

        Raises:
            RuntimeError: No known converter
        NzValue at index z	 of type z has no known converter)	enumerate
isinstancerU   rW   RawValuerb   rx   rF   ra   RuntimeErrortypeappend)rA   rF   rL   indexr^   rb   	converterr,   r,   r-   rK   h  s    

z%CompositePayloadConverter.to_payloadsNrL   rM   rN   rO   rP   c           
      C  s   g }|pg }t t||D ]U\}\}}|tjjkr#|tj| q|jdd}| j|}|du r=t	d|
  z|||| W q tyb }	 ztd| d|
  d|	d}	~	ww |S )zDecode values trying each converter.

        See base class. Always returns the same number of values as payloads.

        Raises:
            KeyError: Unknown payload encoding
            RuntimeError: Error during decode
        rq   	   <unknown>NzUnknown payload encoding zPayload at index z with encoding z could not be converted)r   r   rU   rW   r   r   metadatagetrx   KeyErrordecodere   r   )
rA   rL   rN   rF   r   rb   rf   rq   r   errr,   r,   r-   rR     s*   z'CompositePayloadConverter.from_payloadsr=   r&   r   c                 C  s.   |  |}|du r| S t|  }|j|  |S )zReturn a new instance with context set on the component converters.

        If none of the component converters returned new instances, return self.
        N)get_converters_with_contextr   rz   )rA   r=   rx   new_instancer,   r,   r-   rB     s   


z&CompositePayloadConverter.with_context(Optional[list[EncodingPayloadConverter]]c                 C  sd   | j sdS g }d}| j D ]}t|tr&||| ||d |uO }q|| q|r0|S dS )ziReturn converter instances with context set.

        If no converter uses context, return None.
        NF)_any_converter_takes_contextrx   rF   r   r<   r   rB   )rA   r=   rx   any_with_contextr   r,   r,   r-   r     s   
z5CompositePayloadConverter.get_converters_with_contextr:   c                 C  s   t dd | j D S )Nc                 s  s    | ]}t |tV  qd S rd   )r   r<   r~   r,   r,   r-   	<genexpr>  s    

zICompositePayloadConverter._any_converter_takes_context.<locals>.<genexpr>)anyrx   rF   rp   r,   r,   r-   r     s   z6CompositePayloadConverter._any_converter_takes_context)rx   ro   r>   ry   rk   rd   rl   rC   )r=   r&   r>   r   )r>   r:   )r(   r)   r*   r+   r4   r|   rz   rK   rR   rB   r   	functoolscached_propertyr   r,   r,   r,   r-   rw   Q  s   
 	


!
 
rw   c                      s.   e Zd ZU dZded< 	 d fddZ  ZS )	DefaultPayloadConvertera  Default payload converter compatible with other Temporal SDKs.

    This handles None, bytes, all protobuf message types, and any type that
    :py:func:`json.dump` accepts. A singleton instance of this is available at
    :py:attr:`PayloadConverter.default`.
    z$Tuple[EncodingPayloadConverter, ...]#default_encoding_payload_convertersr>   ry   c                   s   t  jtj  dS )z#Create a default payload converter.N)superr|   r   r   rp   	__class__r,   r-   r|        z DefaultPayloadConverter.__init__r>   ry   )r(   r)   r*   r+   r4   r|   __classcell__r,   r,   r   r-   r     s
   
 r   c                   @  6   e Zd ZdZedddZdd	d
Z	ddddZdS )BinaryNullPayloadConverterz<Converter for 'binary/null' payloads supporting None values.r>   r0   c                 C     dS )See base class.zbinary/nullr,   rp   r,   r,   r-   rq        z#BinaryNullPayloadConverter.encodingr^   r
   rr   c                 C  s(   |du rt jjjjd| j idS dS )r   Nrq   )r   )rU   rV   rW   rX   Payloadrq   r}   r`   r,   r,   r-   ra     s
   
z%BinaryNullPayloadConverter.to_payloadNrb   r_   rf   rj   c                 C  s   t |jdkrtddS )r   r   z'Expected empty data set for binary/nullN)lendatar   ri   r,   r,   r-   re     s   z'BinaryNullPayloadConverter.from_payloadrt   ru   rd   rn   r(   r)   r*   r+   rv   rq   ra   re   r,   r,   r,   r-   r         
r   c                   @  r   )BinaryPlainPayloadConverterz>Converter for 'binary/plain' payloads supporting bytes values.r>   r0   c                 C  r   )r   zbinary/plainr,   rp   r,   r,   r-   rq     r   z$BinaryPlainPayloadConverter.encodingr^   r
   rr   c                 C  s,   t |trtjjjjd| j i|dS dS )r   rq   r   r   N)	r   bytesrU   rV   rW   rX   r   rq   r}   r`   r,   r,   r-   ra     s
   

z&BinaryPlainPayloadConverter.to_payloadNrb   r_   rf   rj   c                 C  s   |j S r   )r   ri   r,   r,   r-   re   
     z(BinaryPlainPayloadConverter.from_payloadrt   ru   rd   rn   r   r,   r,   r,   r-   r     r   r   c                      sJ   e Zd ZdZdd fddZedd	d
ZdddZ	ddddZ  Z	S )JSONProtoPayloadConverterzJConverter for 'json/protobuf' payloads supporting protobuf Message values.Fignore_unknown_fieldsr:   c                      t    || _dS )zInitialize a JSON proto converter.

        Args:
            ignore_unknown_fields: Determines whether converter should error if
                unknown fields are detected
        N)r   r|   _ignore_unknown_fields)rA   r   r   r,   r-   r|     s   

z"JSONProtoPayloadConverter.__init__r>   r0   c                 C  r   )r   zjson/protobufr,   rp   r,   r,   r-   rq   #  r   z"JSONProtoPayloadConverter.encodingr^   r
   rr   c                 C  sd   t |tjjjr0|jdur0tjtjj	|ddd}t
jjjj| j |jj d| dS dS )r   N,:T)
separators	sort_keysrq   messageTyper   )r   googleprotobufmessageMessage
DESCRIPTORjsondumpsjson_formatMessageToDictrU   rV   rW   rX   r   rq   r}   	full_name)rA   r^   json_strr,   r,   r-   ra   (  s   


z$JSONProtoPayloadConverter.to_payloadNrb   r_   rf   rj   c              
   C  s   |j dd }zt| }tjjj|j	|| j
dW S  ty0 } ztd| |d}~w tjjjyC } ztd|d}~ww )r   r   r   )r   Unknown Protobuf type NFailed parsing)r   r   r   _sym_db	GetSymbolr   r   r   Parser   r   r   r   
ParseErrorrA   rb   rf   message_typer^   r   r,   r,   r-   re   >  s   
z&JSONProtoPayloadConverter.from_payload)F)r   r:   rt   ru   rd   rn   )
r(   r)   r*   r+   r|   rv   rq   ra   re   r   r,   r,   r   r-   r     s    

r   c                   @  r   )BinaryProtoPayloadConverterzLConverter for 'binary/protobuf' payloads supporting protobuf Message values.r>   r0   c                 C  r   )r   zbinary/protobufr,   rp   r,   r,   r-   rq   U  r   z$BinaryProtoPayloadConverter.encodingr^   r
   rr   c                 C  sJ   t |tjjjr#|jdur#tjjj	j
| j |jj d| dS dS )r   Nr   r   )r   r   r   r   r   r   rU   rV   rW   rX   r   rq   r}   r   SerializeToStringr`   r,   r,   r-   ra   Z  s   


z&BinaryProtoPayloadConverter.to_payloadNrb   r_   rf   rj   c              
   C  s   |j dd }zt| }||j |W S  ty, } ztd| |d}~w t	j
jjy? } ztd|d}~ww )r   r   r   r   Nr   )r   r   r   r   r   ParseFromStringr   r   r   r   r   r   DecodeErrorr   r,   r,   r-   re   i  s   
z(BinaryProtoPayloadConverter.from_payloadrt   ru   rd   rn   r   r,   r,   r,   r-   r   R  s    
r   c                      s"   e Zd ZdZd fddZ  ZS )AdvancedJSONEncodera*  Advanced JSON encoder.

    This encoder supports dataclasses and all iterables as lists.

    It also uses Pydantic v1's "dict" methods if available on the object,
    but this is deprecated. Pydantic users should upgrade to v2 and use
    temporalio.contrib.pydantic.pydantic_data_converter.
    or
   r>   c                   s   t |tr	| S t|rt |tst|S t|dd}t|r%| S t |t	s5t |t
jjr5t	|S t |tjr?t|S t |S )zZOverride JSON encoding default.

        See :py:meth:`json.JSONEncoder.default`.
        dictN)r   r   	isoformatdataclassesis_dataclassr   asdictgetattrcallablelistcollectionsabcIterableuuidUUIDr0   r   rE   )rA   r   dict_fnr   r,   r-   rE     s   

zAdvancedJSONEncoder.default)r   r
   r>   r
   )r(   r)   r*   r+   rE   r   r,   r,   r   r-   r   z  s    	r   c                      sn   e Zd ZU dZded< ded< ded< edd	g d
d! fddZed"ddZd#ddZ		d$d%dd Z
  ZS )&JSONPlainPayloadConverterao  Converter for 'json/plain' payloads supporting common Python values.

    For encoding, this supports all values that :py:func:`json.dump` supports
    and by default adds extra encoding support for dataclasses, classes with
    ``dict()`` methods, and all iterables.

    For decoding, this uses type hints to attempt to rebuild the type from the
    type hint.
     Optional[Type[json.JSONEncoder]]_encoder Optional[Type[json.JSONDecoder]]_decoderr0   	_encodingNz
json/plain)encoderdecoderrq   custom_type_convertersr   r   rq   r   Sequence[JSONTypeConverter]r>   ry   c                  s&   t    || _|| _|| _|| _dS )am  Initialize a JSON data converter.

        Args:
            encoder: Custom encoder class object to use.
            decoder: Custom decoder class object to use.
            encoding: Encoding name to use.
            custom_type_converters: Set of custom type converters that are used
                when converting from a payload to type-hinted values.
        N)r   r|   r   r   r   _custom_type_converters)rA   r   r   rq   r   r   r,   r-   r|     s
   

z"JSONPlainPayloadConverter.__init__c                 C  s   | j S r   )r   rp   r,   r,   r-   rq     s   z"JSONPlainPayloadConverter.encodingr^   r
   rr   c                 C  sF   t |dr
td tjjjjd| j	 it
j|| jddd	 dS )r   	parse_objzIf you're using Pydantic v2, use temporalio.contrib.pydantic.pydantic_data_converter. If you're using Pydantic v1 and cannot upgrade, refer to https://github.com/temporalio/samples-python/tree/main/pydantic_converter_v1 for better v1 support.rq   r   T)clsr   r   r   )hasattrwarningswarnrU   rV   rW   rX   r   r   r}   r   r   r   r`   r,   r,   r-   ra     s   


z$JSONPlainPayloadConverter.to_payloadrb   r_   rf   rj   c              
   C  sP   zt j|j| jd}|rt||| j}|W S  t jy' } ztd|d}~ww )r   )r   r   N)r   loadsr   r   value_to_typer   JSONDecodeErrorr   )rA   rb   rf   objr   r,   r,   r-   re     s   
z&JSONPlainPayloadConverter.from_payload)
r   r   r   r   rq   r0   r   r   r>   ry   rt   ru   rd   rn   )r(   r)   r*   r+   r4   r   r|   rv   rq   ra   re   r   r,   r,   r   r-   r     s   
 

r   _JSONTypeConverterUnhandledc                   @  s*   e Zd ZdZee Z	 eddd	Zd
S )JSONTypeConverterzConverter for converting an object from Python :py:func:`json.loads`
    result (e.g. scalar, list, or dict) to a known type.
    hintr   r^   r
   r>   1Union[Optional[Any], _JSONTypeConverterUnhandled]c                 C  rI   )a  Convert the given value to a type based on the given hint.

        Args:
            hint: Type hint to use to help in converting the value.
            value: Value as returned by :py:func:`json.loads`. Usually a scalar,
                list, or dict.

        Returns:
            The converted value or :py:attr:`Unhandled` if this converter does
            not handle this situation.
        r?   )rA   r   r^   r,   r,   r-   to_typed_value  rs   z JSONTypeConverter.to_typed_valueN)r   r   r^   r
   r>   r   )	r(   r)   r*   r+   r   object	Unhandledr   r   r,   r,   r,   r-   r     s    
r   c                   @  s^   e Zd ZdZedddZeddd	ZdddZdddZdddZ	dddZ
dddZdS )PayloadCodeczaCodec for encoding/decoding to/from bytes.

    Commonly used for compression or encryption.
    rL   rM   r>   rH   c                      t )aD  Encode the given payloads.

        Args:
            payloads: Payloads to encode. This value should not be mutated.

        Returns:
            Encoded payloads. Note, this does not have to be the same number as
            payloads given, but must be at least one and cannot be more than was
            given.
        r?   r\   r,   r,   r-   r}        zPayloadCodec.encodec                   r   )aD  Decode the given payloads.

        Args:
            payloads: Payloads to decode. This value should not be mutated.

        Returns:
            Decoded payloads. Note, this does not have to be the same number as
            payloads given, but must be at least one and cannot be more than was
            given.
        r?   r\   r,   r,   r-   r     r   zPayloadCodec.decoderS   ry   c                   0   |  |jI dH }|jdd= |j| dS )z:py:meth:`encode` for the
        :py:class:`temporalio.api.common.v1.Payloads` wrapper.

        This replaces the payloads within the wrapper.
        N)r}   rL   extendrA   rL   new_payloadsr,   r,   r-   encode_wrapper+     zPayloadCodec.encode_wrapperc                   r  )z:py:meth:`decode` for the
        :py:class:`temporalio.api.common.v1.Payloads` wrapper.

        This replaces the payloads within.
        N)r   rL   r  r  r,   r,   r-   decode_wrapper6  r  zPayloadCodec.decode_wrapperfailure!temporalio.api.failure.v1.Failurec                      |  || jI dH  dS )zEncode payloads of a failure. Intended as a helper method, not for overriding.
        It is not guaranteed that all failures will be encoded with this method rather
        than encoding the underlying payloads.
        N)_apply_to_failure_payloadsr  rA   r  r,   r,   r-   encode_failureA     zPayloadCodec.encode_failurec                   r
  )zDecode payloads of a failure. Intended as a helper method, not for overriding.
        It is not guaranteed that all failures will be decoded with this method rather
        than decoding the underlying payloads.
        N)r  r  r  r,   r,   r-   decode_failureH  r  zPayloadCodec.decode_failurecb>Callable[[temporalio.api.common.v1.Payloads], Awaitable[None]]c                   s  | dr!tjjjj|jgd}||I d H  |j|jd  | dr6|j	 dr6||j	j
I d H  n>| drK|j drK||jjI d H  n)| dr`|j dr`||jj
I d H  n| d	rt|j drt||jjI d H  | d
r| |j|I d H  d S d S )Nencoded_attributesrT   r   application_failure_infodetailstimeout_failure_infolast_heartbeat_detailscanceled_failure_inforeset_workflow_failure_infocause)HasFieldrU   rV   rW   rX   rY   r  CopyFromrL   r  r  r  r  r  r  r  r  )rA   r  r  rL   r,   r,   r-   r  O  sD   






z'PayloadCodec._apply_to_failure_payloadsN)rL   rM   r>   rH   )rL   rS   r>   ry   )r  r	  r>   ry   )r  r	  r  r  r>   ry   )r(   r)   r*   r+   r   r}   r   r  r  r  r  r  r,   r,   r,   r-   r     s    



r   c                   @  s8   e Zd ZU dZded< 	 edddZedddZdS )FailureConvertera]  Base failure converter to/from errors.

    Note, for workflow exceptions, :py:attr:`to_failure` is only invoked if the
    exception is an instance of :py:class:`temporalio.exceptions.FailureError`.
    Users should extend :py:class:`temporalio.exceptions.ApplicationError` if
    they want a custom workflow exception to work with this class.
    zClassVar[FailureConverter]rE   	exceptionBaseExceptionpayload_converterrD   r  r	  r>   ry   c                 C  rI   )aK  Convert the given exception to a Temporal failure.

        Users should make sure not to alter the ``exception`` input.

        Args:
            exception: The exception to convert.
            payload_converter: The payload converter to use if needed.
            failure: The failure to update with error information.
        r?   )rA   r  r  r  r,   r,   r-   
to_failure{  s   zFailureConverter.to_failurec                 C  rI   )a2  Convert the given Temporal failure to an exception.

        Users should make sure not to alter the ``failure`` input.

        Args:
            failure: The failure to convert.
            payload_converter: The payload converter to use if needed.

        Returns:
            Converted error.
        r?   )rA   r  r  r,   r,   r-   from_failure  s   zFailureConverter.from_failureNr  r  r  rD   r  r	  r>   ry   r  r	  r  rD   r>   r  )r(   r)   r*   r+   r4   r   r   r!  r,   r,   r,   r-   r  o  s   
 r  c                      sP   e Zd ZdZddd fdd	ZdddZdddZdddZdddZ  Z	S ) DefaultFailureConverterzzDefault failure converter.

    A singleton instance of this is available at
    :py:attr:`FailureConverter.default`.
    Fencode_common_attributesr&  r:   r>   ry   c                  r   )a  Create the default failure converter.

        Args:
            encode_common_attributes: If ``True``, the message and stack trace
                of the failure will be moved into the encoded attribute section
                of the failure which can be encoded with a codec.
        N)r   r|   _encode_common_attributes)rA   r&  r   r,   r-   r|     s   

z DefaultFailureConverter.__init__r  r  r  rD   r  r	  c                 C  s   t |tjjr| ||| n)t |tjr| ||| ntjjt	||j
jd}|j|_|j|_| ||| | jrT|j||j|jdgd  d|_d|_dS dS )r   )r   )r   stack_tracer   zEncoded failure N)r   rU   
exceptionsFailureError_error_to_failurenexusrpcHandlerError_nexus_handler_error_to_failureApplicationErrorr0   r   r(   __traceback__	__cause__r'  r  r  rK   r   r(  )rA   r  r  r  failure_errorr,   r,   r-   r     s*   
z"DefaultFailureConverter.to_failureerror"temporalio.exceptions.FailureErrorc                 C  s  |j r||j  d S |j|_|jrdt|j|_|jr)| 	|j||j
 n|js8|jr8| 	|j||j
 t|tjjr}|j  |jrL|j|j_|j|j_|jr_|jj||j |jrj|jj|j |jr{tjjjj|j|j_d S d S t|tjjr|j   tjjjj!|jpd|j _"|j#r|j j#||j# d S d S t|tjj$r|j%  |jr|j%j||j d S d S t|tjj&r|j'  d S t|tjj(r|j)  |j|j)_d S t|tjj*r |j+  |j,|j+_,|j-|j+_-|j.|j+_.|j/|j+j/_0|j1|j+_1tjjjj2|j3pd|j+_3d S t|tjj4r_|j5  |j6|j5_6|j7|j5j8_7|j9|j5j8_9|j:|j5j:_0|j;|j5_;|j-|j5_-tjjjj2|j3pYd|j5_3d S t|tjj<r|j=  |j,|j=_,|j>|j=_>|j?|j=_?|j@|j=_@|jA|j=_Ad S d S )N
r   )Br  r  r   r1  join	traceback	format_tbr(  r2  r   r  __suppress_context____context__r   rU   r*  r0  r  SetInParentr   non_retryabler  rZ   next_retry_delayFromTimedeltacategoryrV   enumsrX   ApplicationErrorCategory	ValueTypeTimeoutErrorr  TimeoutTypetimeout_typer  CancelledErrorr  TerminatedErrorterminated_failure_infoServerErrorserver_failure_infoActivityErroractivity_failure_infoscheduled_event_idstarted_event_ididentityr8   nameactivity_id
RetryStateretry_stateChildWorkflowError%child_workflow_execution_failure_infor1   r2   workflow_executionrun_idr7   initiated_event_idNexusOperationError&nexus_operation_execution_failure_infoendpointservice	operationoperation_tokenrA   r4  r  r  r,   r,   r-   r,    s   























z)DefaultFailureConverter._error_to_failurenexusrpc.HandlerErrorc                 C  s   t ||_|jrdt|j|_|jr| |j||j	 |j
  |jj|j
_tjjjj|jdu r;tjjjjjn|jdu rGtjjjjjntjjjjj|j
_d S )Nr6  TF)r0   r   r1  r7  r8  r9  r(  r2  r   r  nexus_handler_failure_infor<  r   rQ  rU   rV   rA  rX   NexusHandlerErrorRetryBehaviorrC  retryable_override,NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE0NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIEDretry_behaviorr`  r,   r,   r-   r/  9  s   



z7DefaultFailureConverter._nexus_handler_error_to_failurec                 C  s  | drBtjjj }|| |}z*||jgd }t	|t
r<|d}t	|tr/||_|d}t	|tr<||_W n   Y | drq|j}tjj|jpQdg||jR |jp]d|j|j tjt|jd}n=| d	r|j}	tjj|jpd
|	jrtjt|	jnd||	jd}n| dr|j }
tjj!|jpdg||
jR  }n| drtj"|jpd}n| dr|j#}tjj$|jpd|jd}n| dr|j%}tjj&|jpd|j'|j(|j)|j*j+|j,|j-rtj.t|j-ndd}n| dr3|j/}tjj0|jpd|j1|j2j3|j2j4|j5j+|j6|j(|j-r.tj.t|j-ndd}n{| dr|j7}zt8j9|j }W n t:y[   t;<d|j  t8j9j=}Y nw |j>tjj?jj@jAkridn|j>tjj?jj@jBkrvdnd}t8jC|jpd||d}n)| dr|jD}tjjE|jpd |j'|jF|jG|jH|jId!}n
tjJ|jpd"}t	|tjjJr||_K| d#r| L|jM||_N|S )$r   r  r   r   r(  r  zApplication errorN)r   r=  r>  r@  r  Timeout)r   r  r  	CancelledrI  
TerminatedrK  zServer error)r=  rM  zActivity error)rN  rO  rP  r8   rR  rT  rV  zChild workflow error)r1   r2   rX  r7   rY  rO  rT  rb  z Unknown Nexus HandlerErrorType: TFzNexus handler error)r   rd  r[  zNexus operation error)rN  r\  r]  r^  r_  zFailure errorr  )Or  rU   rV   r  rX   Failurer  rR   r  r   r   r   r0   r   r(  r  r*  r0  r]   r  r   r=  r>  ToTimedeltarB  intr@  r  rD  rF  rE  r  r  rG  rH  rK  rJ  rM  rL  rN  rO  rP  r8   rQ  rR  rT  rS  rV  rU  r1   rW  r2   rX  r7   rY  rb  r-  HandlerErrorTyper   loggerwarningINTERNALrh  rA  rc  re  rf  r.  r[  rZ  r\  r]  r^  r_  r+  _failurer!  r  r2  )rA   r  r  new_failurer  r   r(  app_infor   timeout_infocancel_infoserver_infoact_info
child_inforb  _typerd  nexus_op_failure_infor,   r,   r-   r!  N  s  












	








	z$DefaultFailureConverter.from_failure)r&  r:   r>   ry   r"  )r4  r5  r  rD   r  r	  r>   ry   )r4  ra  r  rD   r  r	  r>   ry   r#  )
r(   r)   r*   r+   r|   r   r,  r/  r!  r   r,   r,   r   r-   r$    s    


gr$  c                      s"   e Zd ZdZd fddZ  ZS ),DefaultFailureConverterWithEncodedAttributeszImplementation of :py:class:`DefaultFailureConverter` which moves message
    and stack trace to encoded attributes subject to a codec.
    r>   ry   c                   s   t  jdd dS )z;Create a default failure converter with encoded attributes.Tr%  N)r   r|   rp   r   r,   r-   r|     r   z5DefaultFailureConverterWithEncodedAttributes.__init__r   )r(   r)   r*   r+   r|   r   r,   r,   r   r-   r}    s    r}  c                   @  s   e Zd ZU dZeZded< 	 dZded< 	 eZ	ded< 	 e
jd	d
Zded< 	 e
jd	d
Zded< 	 ded< 	 d4ddZd5ddZ	d6d7dd Zd8d"d#Z	d6d9d%d&Zd:d+d,Zd;d-d.Zd<d2d3ZdS )=DataConverterzData converter for converting and encoding payloads to/from Python values.

    This combines :py:class:`PayloadConverter` which converts values with
    :py:class:`PayloadCodec` which encodes bytes.
    zType[PayloadConverter]payload_converter_classNzOptional[PayloadCodec]payload_codeczType[FailureConverter]failure_converter_classF)initrD   r  r  failure_converterzClassVar[DataConverter]rE   r>   ry   c                 C  s(   t | d|   t | d|   d S )Nr  r  )r   __setattr__r  r  rp   r,   r,   r-   __post_init__  s   zDataConverter.__post_init__rF   rG   rH   c                   s*   | j |}| jr| j|I dH }|S )a  Encode values into payloads.

        First converts values to payloads then encodes payloads using codec.

        Args:
            values: Values to be converted and encoded.

        Returns:
            Converted and encoded payloads. Note, this does not have to be the
            same number as values given, but must be at least one and cannot be
            more than was given.
        N)r  rK   r  r}   )rA   rF   rL   r,   r,   r-   r}     s
   zDataConverter.encoderL   rM   rN   rO   rP   c                   s(   | j r| j |I dH }| j||S )zDecode payloads into values.

        First decodes payloads using codec then converts payloads to values.

        Args:
            payloads: Payloads to be decoded and converted.

        Returns:
            Decoded and converted values.
        N)r  r   r  rR   rQ   r,   r,   r-   r     s   zDataConverter.decoderS   c                   s    t jjjj| |I dH dS )za:py:meth:`encode` for the
        :py:class:`temporalio.api.common.v1.Payloads` wrapper.
        NrT   )rU   rV   rW   rX   rY   r}   rJ   r,   r,   r-   r  )  s   zDataConverter.encode_wrapperr[   c                   s$   |r|j sg S | |j |I dH S )za:py:meth:`decode` for the
        :py:class:`temporalio.api.common.v1.Payloads` wrapper.
        N)rL   r   rQ   r,   r,   r-   r  1  s   
zDataConverter.decode_wrapperr  r  r  r	  c                   s4   | j || j| | jr| j|I dH  dS dS )zConvert and encode failure.N)r  r   r  r  r  )rA   r  r  r,   r,   r-   r  =  s
   zDataConverter.encode_failurec                   s*   | j r| j |I dH  | j|| jS )zDecode and convert failure.N)r  r  r  r!  r  r  r,   r,   r-   r  E  s   zDataConverter.decode_failurer=   r&   r   c                 C  s   | j }| j}| j}t|tr||}t|tr||}t|tr'||}tdd || j f|| jf|| jffD r>| S t| }t	
|d| t	
|d| t	
|d| |S )z@Return an instance with context set on the component converters.c                 s  s    | ]	\}}||u V  qd S rd   r,   )r   neworigr,   r,   r-   r   X  s
    
z-DataConverter.with_context.<locals>.<genexpr>r  r  r  )r  r  r  r   r<   rB   allr   replacer   r  )rA   r=   r  r  r  clonedr,   r,   r-   rB   M  s*   






zDataConverter.with_contextr   rk   rd   rl   rm   )rL   r[   rN   rO   r>   rP   )r  r  r  r	  r>   ry   )r  r	  r>   r  rC   )r(   r)   r*   r+   r   r  r4   r  r$  r  r   fieldr  r  r  r}   r   r  r  r  r  rB   r,   r,   r,   r-   r~    s0   
 




r~  r>   c                   C  s   t jS )zgDefault data converter.

    .. deprecated::
        Use :py:meth:`DataConverter.default` instead.
    )r~  rE   r,   r,   r,   r-   rE   w  r   rE   
attributesRUnion[temporalio.common.SearchAttributes, temporalio.common.TypedSearchAttributes]rV   )temporalio.api.common.v1.SearchAttributesry   c                 C  sj   t | tjjr| D ]\}}|j|j t|| q	dS | s dS |  D ]\}}|j| t	| q$dS )zConvert search attributes into an API message.

    Args:
        attributes: Search attributes to convert. The dictionary form of this is
            DEPRECATED.
        api: API message to set converted attributes on.
    N)
r   rU   rW   TypedSearchAttributesindexed_fieldsrQ  r  #encode_typed_search_attribute_valueitemsencode_search_attribute_values)r  rV   typed_ktyped_vkvr,   r,   r-   encode_search_attributes  s   r  keyPtemporalio.common.SearchAttributeKey[temporalio.common.SearchAttributeValueType]r^   0Optional[temporalio.common.SearchAttributeValue]r_   c                 C  s   |du rt  jdS t|| jstd| d| j t|tr%| }t|t	r8|D ]}t|t
s7tdq,t  j|}| j |jd< |S )zConvert typed search attribute value into a payload.

    Args:
        key: Key for the value.
        value: Value to convert.

    Returns:
        Payload for the value.
    NzValue of type z% not suitable for indexed value type z,All values of a keyword list must be stringsr   )rE   r  ra   r   origin_value_type	TypeErrorindexed_value_typer   r   r   r0   _metadata_typer}   r   )r  r^   r  rb   r,   r,   r-   r    s    


r  vals'temporalio.common.SearchAttributeValuesc                 C  s   t | ts	tdd}g }| D ]@}t |tr$|jdu rtd| }n&t |ttt	t
fs8tdt|j d|rDt||urDtd|sJt|}|| qt j|gd S )zConvert search attribute values into a payload.

    .. deprecated::
        Use typed search attributes instead.

    Args:
        vals: List of values to convert.
    z%Search attribute values must be listsNz6Timezone must be present on all search attribute dateszSearch attribute value of type z. not one of str, int, float, bool, or datetimez@Search attribute values must have the same type for the same keyr   )r   r   r  r   tzinfo
ValueErrorr   r0   rn  floatr:   r   r(   r   rE   r  rK   )r  val_type	safe_valsr  r,   r,   r-   r    s.   



r  non_typed_attributes,Optional[temporalio.common.SearchAttributes]typed_attributes1Optional[temporalio.common.TypedSearchAttributes]c                 C  sD   | r|r|j rtdt| | d S |r|j r t|| d S d S d S )NzLCannot provide both deprecated search attributes and typed search attributes)search_attributesr  r  )r  r  rV   r,   r,   r-   %_encode_maybe_typed_search_attributes  s   

r  Callable[[str], datetime]c                   C  s   t jdkrtjS tjS )zIsolates system version check and returns relevant datetime passer

    Returns:
        A callable to parse date strings into datetimes.
    r   )sysversion_infor   fromisoformatr    isoparser,   r,   r,   r-   _get_iso_datetime_parser  s   
r  "temporalio.common.SearchAttributesc                   st   t  j}i }| j D ],\}}||gd }t|ts|g}|jddkr3t	   fdd|D }|||< q|S )a  Decode API search attributes to values.

    .. deprecated::
        Use typed search attributes instead.

    Args:
        api: API message with search attribute values to convert.

    Returns:
        Converted search attribute values (new mapping every time).
    r   r      Datetimec                   s   g | ]} |qS r,   r,   )r   r  r   r,   r-   
<listcomp>  s    z,decode_search_attributes.<locals>.<listcomp>)
rE   r  r  r  rR   r   r   r   r   r  )rV   convretr  r  valr,   r   r-   decode_search_attributes  s   

r  'temporalio.common.TypedSearchAttributesc           	      C  s   t  j}g }| j D ]V\}}|jd}|sqtjj	||
 }|s%q||}|jtjjjkrBt|trBt|dkr>q|d }|jtjjjkrQt }||}t||jra|tj|| qtj|S )zDecode API search attributes to typed search attributes.

    Args:
        api: API message with search attribute values to convert.

    Returns:
        Typed search attribute collection (new object every time).
    r      r   )rE   r  r  r  r   r   rU   rW   SearchAttributeKey_from_metadata_typer   re   r  SearchAttributeIndexedValueTypeKEYWORD_LISTr   r   r   DATETIMEr  r  r   SearchAttributePairr  )	rV   r  pairsr  r  metadata_typer  r  r    r,   r,   r-   decode_typed_search_attributes  s:   
r  rb   &temporalio.common.SearchAttributeValuec                 C  s6   t  j| }t|tr| jddkrt |}|S )Nr   r  )rE   r  re   r   r0   r   r   r  )rb   r  r,   r,   r-   _decode_search_attribute_valueN  s   
r  r   r   r
   custom_convertersr   c                 C  s  |D ]}| | |}|tjur|  S q| tu r|S | tu rNt|tr>zt |W S  ty= } zt	d| |d}~ww t|trE|S t	dt
| | tu sV| tu rjt|ttfsft	dt
| | |S | tu rt|ts|t	dt
| t|S | tu rt|tst	dt
| t|S | tu rt|tttfst	dt
| t|S | t
du r|durt	dt
| dS t| d	d}|rt|||S t| d
| }t| dd}|tu s|tju r||vrt	d| d| |S |tu }	tjdkr	|	pt|t}	|	r/|D ]}
z	t|
||W   S  ty$   Y qw t	d|  d| t|rMt|tjjrMt|tjjsQt	d|  dt
| i }d}t|ddsct|ddrgt|}t |dkr|d turt|d t!s|d nd}t |dkr|d turt|d t!s|d nd}|" D ]\}}|}|r|#|}|rzCt|tr|tu s|tu r||}n|tu rddd| }n|t
du rddi| }t|t
rt||st|||}W n ty } zt	dt$| d| d|  |d}~ww |r;zt|||}W n ty: } zt	dt$| d|  |d}~ww |||< q|rK| di |}|S t%&| rt|t'sft	d |  d!t
| d"t%(| }t| }i }|D ]:}|#|j)t%j*}|t%j*urzt||j) ||||j)< W qs ty } zt	d#|j) d$|  |d}~ww qs| di |S t+| d%d}t|t,st|t-rt|t'st	d&|  d!t
| d"t| d%|S t| rt| t.rt|ts t	d'|  d(t
| | |S tjd)kr,t| r,t| t/r,t|ts(t	d'|  d*t
| | |S t| r=t| t0j1r=| |S t|rt|tjj2rt|tjj2s_t	d|  dt
| g }|rzt |dkrt|d t!sz|d t3u rt|}ngt4|D ]b\}}|t5ur|d }n0t ||kr|| t3ur|| }n|d+ t3u r|d, }nt	d-|  d.t | d/|d  z|6t||| W q ty } zt	d0|  d1| |d}~ww |t5u rt5|S |t7u rt7|S |tj8u rt8|S |S t	d2|  )3a  Convert a given value to the given type hint.

    This is used internally to convert a raw JSON loaded value to a specific
    type hint.

    Args:
        hint: Type hint to convert the value to.
        value: Raw value (e.g. primitive, dict, or list) to convert from.
        custom_converters: Set of custom converters to try before doing default
            conversion. Converters are tried in order and the first value that
            is not :py:attr:`JSONTypeConverter.Unhandled` will be returned from
            this function instead of doing default behavior.

    Returns:
        Converted value.

    Raises:
        TypeError: Unable to convert to the given hint.
    z Failed parsing datetime string: Nz)Expected datetime or ISO8601 string, got z$Expected value to be int|float, was zExpected value to be bool, was zExpected value to be str, was z Expected value to be bytes, was z!Expected None, got value of type __supertype__
__origin____args__r,   zValue z not in literal values r"   zFailed converting to z from z	Expected z, value was __required_keys____optional_keys__r   r  TF)truefalsenullzFailed converting key z	 to type z in mapping z Failed converting value for key zCannot convert to dataclass z, value is z	 not dictzFailed converting field z on dataclass r   zCannot convert to zCannot convert to enum z!, value not an integer, value is r   z, value not a string, value is r   zType z only expecting z values, got at least zFailed converting z index z'Unserializable type during conversion: )9r   r   r   r
   r   r   r0   r  r  r  r   rn  r  r:   r   r   r   r   r   typing_extensionsr   r  r  r$   	Exceptioninspectisclass
issubclassr   r   r   r   r   r   r  r   reprr   r   r   fieldsrQ  MISSINGgetattr_staticclassmethodstaticmethodr   r!   r   r   r   Ellipsisr   tupler   setdeque)r   r^   r  r  r  r   	supertypeorigin	type_argsis_unionargret_dictper_key_typeskey_type
value_typer  this_value_typer  field_hintsfield_valuesr  field_valueparse_obj_attrret_listiitemarg_typer,   r,   r-   r   W  s  




	











r   )r>   r~  )r  r  rV   r  r>   ry   )r  r  r^   r  r>   r_   )r  r  r>   r_   )r  r  r  r  rV   r  r>   ry   )r>   r  )rV   r  r>   r  )rV   r  r>   r  )rb   r_   r>   r  )r   r   r^   r
   r  r   r>   r
   )kr+   
__future__r   r   collections.abcr   r   r  r   r  r8  r   r   r   r   r   r   r   enumr   	itertoolsr   loggingr	   typingr
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   google.protobuf.duration_pb2r   google.protobuf.json_formatgoogle.protobuf.messagegoogle.protobuf.symbol_databaser-  r  r   temporalio.api.common.v1rU   temporalio.api.enums.v1temporalio.api.failure.v1temporalio.api.sdk.v1temporalio.commontemporalio.exceptionstemporalio.typesr  dateutilr    r!   typesr$   r(   rp  r&   r/   r5   r6   r<   rD   ro   rw   r   r   r   r   symbol_databaseDefaultr   r   r   JSONEncoderr   r   r   r   r   r   r  r$  r}  r~  r   rE   r  r  r  r  r  r  r  r  r  r  r   r,   r,   r,   r-   <module>   s    L


u2|<("
Jj2  ;
 



	

&
&



0