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/s3transfer/__pycache__/subscribers.cpython-311.pyc
�

/�;f#��D�ddlmZddlmZddlmZGd�d��ZdS)�)�	lru_cache)�accepts_kwargs)�InvalidSubscriberMethodErrorc�r��eZdZdZgd�Z�fd�Zee��d�����Zd�Z	d�Z
d�Z�xZS)�BaseSubscriberz�The base subscriber class

    It is recommended that all subscriber implementations subclass and then
    override the subscription methods (i.e. on_{subsribe_type}() methods).
    )�queued�progress�donec�n��|���t���|��S)N)�_validate_subscriber_methods�super�__new__)�cls�args�kwargs�	__class__s   ��I/opt/alt/python311/lib/python3.11/site-packages/s3transfer/subscribers.pyrzBaseSubscriber.__new__s+����(�(�*�*�*��w�w���s�#�#�#�c���|jD]W}t|d|z��}t|��std|z���t	|��std|z����XdS)N�on_z&Subscriber method %s must be callable.z=Subscriber method %s must accept keyword arguments (**kwargs))�VALID_SUBSCRIBER_TYPES�getattr�callablerr)r�subscriber_type�subscriber_methods   rrz+BaseSubscriber._validate_subscriber_methods s��� #�9�	�	�O� '��U�_�-D� E� E���-�.�.�
�2�<�'�(����
"�"3�4�4�
�2�+�->�?����
�	�	rc��dS)a�Callback to be invoked when transfer request gets queued

        This callback can be useful for:

            * Keeping track of how many transfers have been requested
            * Providing the expected transfer size through
              future.meta.provide_transfer_size() so a HeadObject would not
              need to be made for copies and downloads.

        :type future: s3transfer.futures.TransferFuture
        :param future: The TransferFuture representing the requested transfer.
        N���self�futurers   r�	on_queuedzBaseSubscriber.on_queued1�	��	
�rc��dS)ajCallback to be invoked when progress is made on transfer

        This callback can be useful for:

            * Recording and displaying progress

        :type future: s3transfer.futures.TransferFuture
        :param future: The TransferFuture representing the requested transfer.

        :type bytes_transferred: int
        :param bytes_transferred: The number of bytes transferred for that
            invocation of the callback. Note that a negative amount can be
            provided, which usually indicates that an in-progress request
            needed to be retried and thus progress was rewound.
        Nr)rr �bytes_transferredrs    r�on_progresszBaseSubscriber.on_progress@s	�� 	
�rc��dS)a�Callback to be invoked once a transfer is done

        This callback can be useful for:

            * Recording and displaying whether the transfer succeeded or
              failed using future.result()
            * Running some task after the transfer completed like changing
              the last modified time of a downloaded file.

        :type future: s3transfer.futures.TransferFuture
        :param future: The TransferFuture representing the requested transfer.
        Nrrs   r�on_donezBaseSubscriber.on_doneRr"r)
�__name__�
__module__�__qualname__�__doc__rr�classmethodrrr!r%r'�
__classcell__)rs@rrrs����������<�;�;��$�$�$�$�$���Y�[�[�
�
��[��[�
�

�

�

�
�
�
�$

�

�

�

�

�

�

rrN)�	functoolsr�s3transfer.compatr�s3transfer.exceptionsrrrrr�<module>r1sy�� ������,�,�,�,�,�,�>�>�>�>�>�>�L
�L
�L
�L
�L
�L
�L
�L
�L
�L
r