ó
    ³vKg	  ã                   ó<   • S SK Jr  S SKJr  S SKJr   " S S5      rg)é    )Ú	lru_cache)Úaccepts_kwargs)ÚInvalidSubscriberMethodErrorc                   ó`   ^ • \ rS rSrSr/ SQrU 4S jr\\S 5       5       r	S r
S rS rS	rU =r$ )
ÚBaseSubscriberé   zª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                 óB   >• U R                  5         [        TU ]	  U 5      $ )N)Ú_validate_subscriber_methodsÚsuperÚ__new__)ÚclsÚargsÚkwargsÚ	__class__s      €ÚV/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/s3transfer/subscribers.pyr   ÚBaseSubscriber.__new__   s   ø€ Ø×(Ñ(Ô*Ü‰w‰˜sÓ#Ð#ó    c                 óÄ   • U R                    HP  n[        U SU-   5      n[        U5      (       d  [        SU S35      e[	        U5      (       a  MC  [        SU S35      e   g )NÚon_zSubscriber method z must be callable.z) must accept keyword arguments (**kwargs))ÚVALID_SUBSCRIBER_TYPESÚgetattrÚcallabler   r   )r   Úsubscriber_typeÚsubscriber_methods      r   r   Ú+BaseSubscriber._validate_subscriber_methods    s|   € ð  #×9Ô9ˆOÜ '¨¨U°_Ñ-DÓ EÐÜÐ-×.Ñ.Ü2Ø(Ð):Ð(;Ð;MÐNóð ô "Ð"3×4Ó4Ü2Ø(Ð):Ð(;ð <+ð +óð ò  :r   c                 ó   • g)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Úfuturer   s      r   Ú	on_queuedÚBaseSubscriber.on_queued0   ó   € ð 	r   c                 ó   • g)a  Callback 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    )r"   r#   Úbytes_transferredr   s       r   Úon_progressÚBaseSubscriber.on_progress?   s   € ð  	r   c                 ó   • g)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.
Nr    r!   s      r   Úon_doneÚBaseSubscriber.on_doneQ   r&   r   r    )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Úclassmethodr   r   r$   r)   r,   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      sE   ø† ñò <Ðõ$ð Øñó ó ðòò÷$ð r   r   N)Ú	functoolsr   Ús3transfer.compatr   Ús3transfer.exceptionsr   r   r    r   r   Ú<module>r9      s   ðõ  å ,Ý >÷Kò Kr   