HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/botocore/__pycache__/waiter.cpython-311.pyc
�

/�;f�7���ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZmZej
e��Zd�Zd�ZGd	�d
��ZGd�d��ZGd
�d��ZGd�d��ZGd�d��ZdS)�N)�WaiterDocstring)�get_service_module_name�)�
xform_name)�ClientError�WaiterConfigError�WaiterErrorc��|�|��}t|j��}tt	||����}d�}t||jj|jj|d���|_	tt|jj���d|����}t|tfd|i��}||||��S)a

    :type waiter_name: str
    :param waiter_name: The name of the waiter.  The name should match
        the name (including the casing) of the key name in the waiter
        model file (typically this is CamelCasing).

    :type waiter_model: botocore.waiter.WaiterModel
    :param waiter_model: The model for the waiter configuration.

    :type client: botocore.client.BaseClient
    :param client: The botocore client associated with the service.

    :rtype: botocore.waiter.Waiter
    :return: The waiter object.

    c�*�tj|fi|��dS�N)�Waiter�wait)�self�kwargss  �B/opt/alt/python311/lib/python3.11/site-packages/botocore/waiter.pyrz'create_waiter_with_client.<locals>.wait6s ����D�#�#�F�#�#�#�#�#�F)�waiter_name�
event_emitter�
service_model�service_waiter_model�include_signaturez.Waiter.r)�
get_waiterr�	operation�NormalizedOperationMethod�getattrr�meta�eventsr�__doc__�strr�typer
)	r�waiter_model�client�single_waiter_config�operation_name�operation_methodr�waiter_class_name�documented_waiter_clss	         r�create_waiter_with_clientr(s���$(�2�2�;�?�?��� 4� >�?�?�N�0����'�'����$�$�$�#���k�(��k�/�)�����D�L��"�6�;�#<�=�=�=�=�{�{�	L����!�!2�V�I���~�N�N��!� ��)�+;���rc�f�|�d��}t|t��rd|vrdSdS)N�Error�CodeTF)�get�
isinstance�dict)�response�errors  r�is_valid_waiter_errorr1Ps7���L�L��!�!�E��%�����6�U�?�?��t��5rc��eZdZd�Zd�ZdS)rc��||_dSr)�_client_method)r�
client_methods  r�__init__z"NormalizedOperationMethod.__init__Xs��+����rc�Z�	|jdi|��S#t$r}|jcYd}~Sd}~wwxYw)N�)r4rr/)rr�es   r�__call__z"NormalizedOperationMethod.__call__[sV��	�&�4�&�0�0��0�0�0���	�	�	��:�����������	���s��
*�%�*�*N)�__name__�
__module__�__qualname__r6r:r8rrrrWs2������,�,�,�����rrc�$�eZdZdZd�Zd�Zd�ZdS)�WaiterModel�c��|d|_|�dd��}|�|��||_t	t|d�������|_dS)a�

        Note that the WaiterModel takes ownership of the waiter_config.
        It may or may not mutate the waiter_config.  If this is a concern,
        it is best to make a copy of the waiter config before passing it to
        the WaiterModel.

        :type waiter_config: dict
        :param waiter_config: The loaded waiter config
            from the <service>*.waiters.json file.  This can be
            obtained from a botocore Loader object as well.

        �waiters�version�unknownN)�_waiter_configr,�_verify_supported_versionrC�list�sorted�keys�waiter_names)r�
waiter_configrCs   rr6zWaiterModel.__init__esr��,�I�6���
 �#�#�I�y�9�9���&�&�w�/�/�/���� ��
�i�(@�(E�(E�(G�(G�!H�!H�I�I����rc�R�||jkrtd|j�d|������dS)Nz7Unsupported waiter version, supported version must be: z#, but version of waiter config is: ��	error_msg)�SUPPORTED_VERSIONr)rrCs  rrFz%WaiterModel._verify_supported_version}sJ���d�,�,�,�#�#�!%� 6� 6� 6���A����
�-�,rc�~�	|j|}n #t$rtd|z���wxYwt|��S)NzWaiter does not exist: %s)rE�KeyError�
ValueError�SingleWaiterConfig)rrr#s   rrzWaiterModel.get_waiter�s[��	H�#'�#6�{�#C� � ���	H�	H�	H��8�;�F�G�G�G�	H����!�"6�7�7�7s�
�-N)r;r<r=rOr6rFrr8rrr?r?bsJ��������J�J�J�0���8�8�8�8�8rr?c�.�eZdZdZd�Zed���ZdS)rSz�Represents the waiter configuration for a single waiter.

    A single waiter is considered the configuration for a single
    value associated with a named waiter (i.e TableExists).

    c��||_|�dd��|_|d|_|d|_|d|_dS)N�description�r�delay�maxAttempts)�_configr,rVrrX�max_attempts)rr#s  rr6zSingleWaiterConfig.__init__�sN��+���0�3�3�M�2�F�F���-�k�:���)�'�2��
�0��?����rc�r�g}|jdD]&}t|��}|�|���'|S)N�	acceptors)rZ�AcceptorConfig�append)rr]�acceptor_config�acceptors    rr]zSingleWaiterConfig.acceptors�sG���	�#�|�K�8�	'�	'�O�%�o�6�6�H����X�&�&�&�&��rN)r;r<r=rr6�propertyr]r8rrrSrS�sK��������@�@�@�����X���rrSc�N�eZdZd�Zed���Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	S)
r^c��|d|_|d|_|d|_|�d��|_|���|_dS)N�state�matcher�expected�argument)rerfrgr,rh�_create_matcher_func�matcher_func)r�configs  rr6zAcceptorConfig.__init__�sR���G�_��
��i�(����z�*��
��
�
�:�.�.��
� �5�5�7�7����rc�8�|jdkr d�|j|j��S|jdkrd|j�d|j�d�S|jdkrd|j�d|j�d	�S|jd
kr
d|jzS|jdkr
d
|jzSd|jzS)N�pathz2For expression "{}" we matched expected path: "{}"�pathAllzFor expression "z&" all members matched excepted path: "�"�pathAnyz" we matched expected path: "z" at least once�statusz%Matched expected HTTP status code: %sr0z'Matched expected service error code: %sz,No explanation for unknown waiter type: "%s")rf�formatrhrg�rs r�explanationzAcceptorConfig.explanation�s����<�6�!�!�G�N�N��
��
���
��\�Y�
&�
&�
&��=�=�=�$�-�-�-�1�
��\�Y�
&�
&�
&��=�=�=�$�-�-�-�1�
��\�X�
%�
%�:�T�]�J�J�
�\�W�
$�
$�<�t�}�L�L�?���M�
rc�h�|jdkr|���S|jdkr|���S|jdkr|���S|jdkr|���S|jdkr|���St
d|jz����)Nrmrnrprqr0zUnknown acceptor: %srM)rf�_create_path_matcher�_create_path_all_matcher�_create_path_any_matcher�_create_status_matcher�_create_error_matcherrrss rriz#AcceptorConfig._create_matcher_func�s����<�6�!�!��,�,�.�.�.�
�\�Y�
&�
&��0�0�2�2�2�
�\�Y�
&�
&��0�0�2�2�2�
�\�X�
%�
%��.�.�0�0�0�
�\�W�
$�
$��-�-�/�/�/�#�0�4�<�?����
rc�V���tj|j���|j���fd�}|S)Nc�X��t|��rdS��|���kSr)r1�search)r/rg�
expressions ��r�acceptor_matchesz=AcceptorConfig._create_path_matcher.<locals>.acceptor_matches�s1���$�X�.�.�
����$�$�X�.�.�(�:�:r��jmespath�compilerhrg�rrrgr~s  @@rrvz#AcceptorConfig._create_path_matcher�sC�����%�d�m�4�4�
��=��	;�	;�	;�	;�	;�	;�
 �rc�V���tj|j���|j���fd�}|S)Nc���t|��rdS��|��}t|t��r|sdS|D]}|�krdS�dS�NFT�r1r}r-rG�r/�result�elementrgr~s   ��rrzAAcceptorConfig._create_path_all_matcher.<locals>.acceptor_matches�sv���$�X�.�.�
����&�&�x�0�0�F��f�d�+�+�
�6�
�
�u�!�
!�
!���h�&�&� �5�5�'��4rr�r�s  @@rrwz'AcceptorConfig._create_path_all_matcher�sC�����%�d�m�4�4�
��=��
	�
	�
	�
	�
	�
	� �rc�V���tj|j���|j���fd�}|S)Nc���t|��rdS��|��}t|t��r|sdS|D]}|�krdS�dSr�r�r�s   ��rrzAAcceptorConfig._create_path_any_matcher.<locals>.acceptor_matchessv���$�X�.�.�
����&�&�x�0�0�F��f�d�+�+�
�6�
�
�u�!�
 �
 ���h�&�&��4�4�'��5rr�r�s  @@rrxz'AcceptorConfig._create_path_any_matchersC�����%�d�m�4�4�
��=��
	�
	�
	�
	�
	�
	� �rc� ��|j��fd�}|S)Nc�b��|�di���d��}|�kS)N�ResponseMetadata�HTTPStatusCode�r,)r/�status_codergs  �rrz?AcceptorConfig._create_status_matcher.<locals>.acceptor_matchess9���#�,�,�'9�2�>�>�B�B� ���K��(�*�*r�rg�rrrgs  @rryz%AcceptorConfig._create_status_matchers+����=��	+�	+�	+�	+�	+� �rc� ��|j��fd�}|S)Nc�`��|�di���dd���kS)Nr*r+rWr�)r/rgs �rrz>AcceptorConfig._create_error_matcher.<locals>.acceptor_matches*s.����<�<���,�,�0�0���<�<��H�Hrr�r�s  @rrzz$AcceptorConfig._create_error_matcher's0����=��	I�	I�	I�	I�	I� �rN)r;r<r=r6rbrtrirvrwrxryrzr8rrr^r^�s�������8�8�8�����X��2���0	 �	 �	 � � � �* � � �* � � � � � � � rr^c��eZdZd�Zd�ZdS)r
c�0�||_||_||_dS)a�

        :type name: string
        :param name: The name of the waiter

        :type config: botocore.waiter.SingleWaiterConfig
        :param config: The configuration for the waiter.

        :type operation_method: callable
        :param operation_method: A callable that accepts **kwargs
            and returns a response.  For example, this can be
            a method from a botocore client.

        N)�_operation_method�namerk)rr�rkr%s    rr6zWaiter.__init__7s ��"2�����	�����rc
�2�t|jj��}d}|�di��}|�d|jj��}|�d|jj��}d}d}	|jdi|��}	|dz
}|D]"}
|
�|	��r|
}|
j	}na�#t|	��rQt|jd|	d	�d
d���d|	d	�d
d����|	����|dkrt�d��dS|dkr!d|
jz}t|j||	����||kr&|�d}n
d|
jz}t|j||	����t!j|����")N�waiting�WaiterConfig�Delay�MaxAttemptsrTrzAn error occurred (r*r+�Unknownz): �Message)r��reason�
last_response�successz3Waiting complete, waiter matched the success state.�failurez/Waiter encountered a terminal failure state: %szMax attempts exceededz4Max attempts exceeded. Previously accepted state: %sr8)rGrkr]�popr,rXr[r�rjrer1r	r��logger�debugrt�time�sleep)rrr]�
current_staterk�sleep_amountr[�last_matched_acceptor�num_attemptsr/rar�s            rrzWaiter.waitLs�����.�/�/�	�!�
����N�B�/�/���z�z�'�4�;�+<�=�=���z�z�-���1I�J�J�� $����3	%�-�t�-�7�7��7�7�H��A��L�%�
�
���(�(��2�2��,4�)�$,�N�M��E��)��2�2��&�!�Y�Y�%�W�-�1�1�&�)�D�D�D�D�$�W�-�1�1�)�Y�G�G�G� �
'/������	�)�)����L�������	�)�)�J��(���"���!�"*�����
�|�+�+�(�0�4�F�F�O�#�/�1��"���!�"*�����

�J�|�$�$�$�g3	%rN)r;r<r=r6rr8rrr
r
6s2���������*=%�=%�=%�=%�=%rr
)�loggingr�r��botocore.docs.docstringr�botocore.utilsrrWr�
exceptionsrrr	�	getLoggerr;r�r(r1rr?rSr^r
r8rr�<module>r�s���������������3�3�3�3�3�3�2�2�2�2�2�2�������C�C�C�C�C�C�C�C�C�C�	��	�8�	$�	$��2�2�2�j�����������*8�*8�*8�*8�*8�*8�*8�*8�Z��������6I �I �I �I �I �I �I �I �XS%�S%�S%�S%�S%�S%�S%�S%�S%�S%r