403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/s3transfer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/s3transfer/__pycache__/futures.cpython-314.pyc
+
[m�h2U���^RIt^RIt^RIt^RIt^RIHt^RIHt^RIH	t	^RI
HtHt^RI
HtHt^RIHt]P&!]4t!R	R
4t!RR4t!R
R]4t!RR]4t!RR4t!RR4t!RR4t!RR4t!RR]4t!RR4t]!RR.4t ] !R4t!] !R 4t"R# ]dRtL�i;i)!�N)�
namedtuple)�futures)�MAXINT)�CancelledError�TransferNotDoneError)�FunctionContainer�
TaskSemaphore)�get_contextc��R#�N�r
��4/usr/lib/python3/dist-packages/s3transfer/futures.pyr
r
s��rc�Ba�]tRt^#to]R4tRtRtRtRt	Vt
R#)�BaseTransferFuturec��\R4h)z-The metadata associated to the TransferFuture�meta��NotImplementedError��selfs&rr�BaseTransferFuture.meta$s��"�&�)�)rc��\R4h)z]Determines if a TransferFuture has completed

:returns: True if completed. False, otherwise.
zdone()rrs&r�done�BaseTransferFuture.done)s��
"�(�+�+rc��\R4h)��Waits until TransferFuture is done and returns the result

If the TransferFuture succeeded, it will return the result. If the
TransferFuture failed, it will raise the exception associated to the
failure.
zresult()rrs&r�result�BaseTransferFuture.result0s��"�*�-�-rc��\R4h)z6Cancels the request associated with the TransferFuturezcancel()rrs&r�cancel�BaseTransferFuture.cancel9s
��!�*�-�-rr
N)�__name__�
__module__�__qualname__�__firstlineno__�propertyrrrr!�__static_attributes__�__classdictcell__��
__classdict__s@rrr#s+����
�*��*�,�.�.�.rrc�Pa�]tRt^>to]R4t]R4t]R4tRtVt	R#)�BaseTransferMetac��\R4h)�*The call args used in the transfer request�	call_argsrrs&rr0�BaseTransferMeta.call_args?s��"�+�.�.rc��\R4h)�The unique id of the transfer�transfer_idrrs&rr4�BaseTransferMeta.transfer_idDs��"�-�0�0rc��\R4h)�.A dictionary that requesters can store data in�user_contextrrs&rr8�BaseTransferMeta.user_contextIs��"�.�1�1rr
N)
r#r$r%r&r'r0r4r8r(r)r*s@rr-r->s?����
�/��/��1��1��2��2rr-c�Ra�]tRt^OtoR	Rlt]R4tRtRtRt	Rt
RtVtR#)
�TransferFutureNc�n�WnVf\4VnW nVf\4VnR#R#)aJThe future associated to a submitted transfer request

:type meta: TransferMeta
:param meta: The metadata associated to the request. This object
    is visible to the requester.

:type coordinator: TransferCoordinator
:param coordinator: The coordinator associated to the request. This
    object is not visible to the requester.
N)�_meta�TransferMeta�_coordinator�TransferCoordinator)rr�coordinators&&&r�__init__�TransferFuture.__init__Ps3���
��<�%��D�J�'���� 3� 5�D��rc��VP#r)r=rs&rr�TransferFuture.metacs���z�z�rc�6�VPP4#r)r?rrs&rr�TransferFuture.donegs��� � �%�%�'�'rc��VPP4# \dpTP4ThRp?ii;ir)r?r�KeyboardInterruptr!)r�es& rr�TransferFuture.resultjs<��	��$�$�+�+�-�-�� �	��K�K�M��G��	�s��>�9�>c�:�VPP4R#r)r?r!rs&rr!�TransferFuture.cancelts����� � �"rc��VP4'g\R4hVPPVRR7R#)z!Sets the exception on the future.z?set_exception can only be called once the transfer is complete.T)�overrideN)rrr?�
set_exception)r�	exceptions&&rrP�TransferFuture.set_exceptionws:���y�y�{�{�&���
�	
���'�'�	�D�'�Ar)r?r=�NN)
r#r$r%r&rBr'rrrr!rPr(r)r*s@rr;r;Os9����6�&����(��#�B�Brr;c�a�]tRt^�toRtRRlt]R4t]R4t]R4t	]R4t
]R4tR	tR
t
RtVtR#)
r>z'Holds metadata about the TransferFutureNc�H�WnW nRVn/VnRVnR#r)�
_call_args�_transfer_id�_size�
_user_context�_etag)rr0r4s&&&rrB�TransferMeta.__init__�s#��#��'����
������
rc��VP#)r/)rVrs&rr0�TransferMeta.call_args�s�����rc��VP#)r3)rWrs&rr4�TransferMeta.transfer_id�s��� � � rc��VP#)z)The size of the transfer request if known�rXrs&r�size�TransferMeta.size�����z�z�rc��VP#)r7)rYrs&rr8�TransferMeta.user_context�s���!�!�!rc��VP#)z@The etag of the stored object for validating multipart downloads�rZrs&r�etag�TransferMeta.etag�rdrc��WnR#)z�A method to provide the size of a transfer request

By providing this value, the TransferManager will not try to
call HeadObject or use the use OS to determine the size of the
transfer.
Nra)rrbs&&r�provide_transfer_size�"TransferMeta.provide_transfer_size��	���
rc��WnR#)z�A method to provide the etag of a transfer request

By providing this value, the TransferManager will validate
multipart downloads by supplying an IfMatch parameter with
the etag as the value to GetObject requests.
Nrh)rris&&r�provide_object_etag� TransferMeta.provide_object_etag�rnr)rVrZrXrWrYrS)r#r$r%r&�__doc__rBr'r0r4rbr8rirlrpr(r)r*s@rr>r>�s�����1�������!��!������"��"�������rr>c��a�]tRt^�toRtRRltRt]R4t]R4t	]R4t
]R4tR	tRR
lt
RtR]3R
ltRtRtRtRRltRtRtRtRtRtRtRtRtRtRtRtVt R#)r@z*A helper class for managing TransferFutureNc�z�WnRVnRVnRVn\	4Vn.Vn.Vn\P!4Vn
\P!4Vn\P!4Vn
\P!4Vn\P!4VnR#)�not-startedN)r4�_status�_result�
_exception�set�_associated_futures�_failure_cleanups�_done_callbacks�	threading�Event�_done_event�Lock�_lock�_associated_futures_lock�_done_callbacks_lock�_failure_cleanups_lock)rr4s&&rrB�TransferCoordinator.__init__�s���&��$���������#&�5�� �!#���!���$�?�?�,����^�^�%��
�(1���(8��%�$-�N�N�$4��!�&/�n�n�&6��#rc�N�VPPRVPR2#)z
(transfer_id=�))�	__class__r#r4rs&r�__repr__�TransferCoordinator.__repr__�s'���.�.�)�)�*�-��8H�8H�7I��K�Krc��VP#r)rxrs&rrQ�TransferCoordinator.exception�s�����rc��VP;_uu_4\P!VP4uuRRR4# +'giR#;i)z�The list of futures associated to the inprogress TransferFuture

Once the transfer finishes this list becomes empty as the transfer
is considered done and there should be no running futures left.
N)r��copyrzrs&r�associated_futures�&TransferCoordinator.associated_futures�s3���
*�
*�
*��9�9�T�5�5�6�	+�
*�
*�
*�s� A�A	c��VP#)z;The list of callbacks to call when the TransferFuture fails)r{rs&r�failure_cleanups�$TransferCoordinator.failure_cleanups�s���%�%�%rc��VP#)aThe status of the TransferFuture

The currently supported states are:
    * not-started - Has yet to start. If in this state, a transfer
      can be canceled immediately and nothing will happen.
    * queued - SubmissionTask is about to submit tasks
    * running - Is inprogress. In-progress as of now means that
      the SubmissionTask that runs the transfer is being executed. So
      there is no guarantee any transfer requests had been made to
      S3 if this state is reached.
    * cancelled - Was cancelled
    * failed - An exception other than CancelledError was thrown
    * success - No exceptions were thrown and is done.
)rvrs&r�status�TransferCoordinator.status�s�� �|�|�rc��VP;_uu_4RVnWnRVnRRR4R# +'giR#;i)a�Set a result for the TransferFuture

Implies that the TransferFuture succeeded. This will always set a
result because it is invoked on the final task where there is only
ever one final task and it is ran at the very end of a transfer
process. So if a result is being set for this final task, the transfer
succeeded even if something came a long and canceled the transfer
on the final task.
N�success)r�rxrwrv�rrs&&r�
set_result�TransferCoordinator.set_result�s,���Z�Z�Z�"�D�O�!�L�$�D�L��Z�Z�Z�s	�4�A	c��VP;_uu_4VP4'd	V'dWnRVnRRR4R# +'giR#;i)z�Set an exception for the TransferFuture

Implies the TransferFuture failed.

:param exception: The exception that cause the transfer to fail.
:param override: If True, override any existing state.
�failedN)r�rrxrv)rrQrOs&&&rrP�!TransferCoordinator.set_exceptions2���Z�Z�Z��9�9�;�;�(�"+��'����Z�Z�Z�s�A�
A�A	c��VPP\4VP'd
VPhVP#)r)r�waitrrxrwrs&rr�TransferCoordinator.results7��	
�����f�%��?�?�?��/�/�!��|�|�r�c�B�VP;_uu_4VP4'gXRp\PRW4V!V4VnVP
R8XdRpRVnV'dVP
4RRR4R# +'giR#;i)z�Cancels the TransferFuture

:param msg: The message to attach to the cancellation
:param exc_type: The type of exception to set for the cancellation
Fz%s cancel(%s) calledruT�	cancelledN)r�r�logger�debugrxrv�
announce_done)r�msg�exc_type�should_announce_dones&&& rr!�TransferCoordinator.cancel"sl���Z�Z�Z��9�9�;�;�',�$����3�T�?�"*�3�-����<�<�=�0�+/�(�*���'��&�&�(��Z�Z�Z�s�AB
�3B
�
B	c�(�VPR4R#)z+Sets the TransferFutrue's status to running�queuedN��_transition_to_non_done_staters&r�set_status_to_queued�(TransferCoordinator.set_status_to_queued3s���*�*�8�4rc�(�VPR4R#)z+Sets the TransferFuture's status to running�runningNr�rs&r�set_status_to_running�)TransferCoordinator.set_status_to_running7s���*�*�9�5rc	���VP;_uu_4VP4'd\RVPRVR24hWnRRR4R# +'giR#;i)z%Unable to transition from done state z to non-done state �.N)r�r�RuntimeErrorr�rv)r�
desired_states&&rr��1TransferCoordinator._transition_to_non_done_state;sS��
�Z�Z�Z��y�y�{�{�"�;�D�K�K�=�I�*�O�1�.���)�L�
�Z�Z�Z�s�9A�A)	c	���\PRVRVRVPR24VPW#R7pVP	V4VP\
VPV44V#)a�Submits a task to a provided executor

:type executor: s3transfer.futures.BoundedExecutor
:param executor: The executor to submit the callable to

:type task: s3transfer.tasks.Task
:param task: The task to submit to the executor

:type tag: s3transfer.futures.TaskTag
:param tag: A tag to associate to the submitted task

:rtype: concurrent.futures.Future
:returns: A future representing the submitted task
zSubmitting task z
 to executor z for transfer request: r�)�tag)r�r�r4�submit�add_associated_future�add_done_callbackr�remove_associated_future)r�executor�taskr��futures&&&& rr��TransferCoordinator.submitDsy��	����t�f�M�(��;R�SW�Sc�Sc�Rd�de�f�	
������/��	
�"�"�6�*�� � ��d�;�;�V�D�	
��
rc� �VPR9#)z�Determines if a TransferFuture has completed

:returns: False if status is equal to 'failed', 'cancelled', or
    'success'. True, otherwise
)r�r�r�)r�rs&rr�TransferCoordinator.done_s���{�{�@�@�@rc��VP;_uu_4VPPV4RRR4R# +'giR#;i)z6Adds a future to be associated with the TransferFutureN)r�rz�add�rr�s&&rr��)TransferCoordinator.add_associated_futuregs1��
�
*�
*�
*��$�$�(�(��0�+�
*�
*�
*��	�;�A	c��VP;_uu_4VPPV4RRR4R# +'giR#;i)z4Removes a future's association to the TransferFutureN)r�rz�remover�s&&rr��,TransferCoordinator.remove_associated_futurels1��
�
*�
*�
*��$�$�+�+�F�3�+�
*�
*�
*�r�c	��VP;_uu_4VPP\V.VO5/VB4RRR4R# +'giR#;i)z7Add a done callback to be invoked when transfer is doneN)r�r|�appendr�r�function�args�kwargss&&*,rr��%TransferCoordinator.add_done_callbackqsC��
�
&�
&�
&�� � �'�'�!�(�<�T�<�V�<�
�'�
&�
&�
&���)A�A	c	��VP;_uu_4VPP\V.VO5/VB4RRR4R# +'giR#;i)z$Adds a callback to call upon failureN)r�r{r�rr�s&&*,r�add_failure_cleanup�'TransferCoordinator.add_failure_cleanupxsC��
�
(�
(�
(��"�"�)�)�!�(�<�T�<�V�<�
�)�
(�
(�
(�r�c��VPR8wdVP4VPP4VP	4R#)a%Announce that future is done running and run associated callbacks

This will run any failure cleanups if the transfer failed if not
they have not been run, allows the result() to be unblocked, and will
run any done callbacks associated to the TransferFuture if they have
not already been ran.
r�N)r��_run_failure_cleanupsrry�_run_done_callbacksrs&rr��!TransferCoordinator.announce_dones:���;�;�)�#��&�&�(�������� � �"rc��VP;_uu_4VPVP4.VnRRR4R# +'giR#;ir)r��_run_callbacksr|rs&rr��'TransferCoordinator._run_done_callbacks�s;���
&�
&�
&����� 4� 4�5�#%�D� �'�
&�
&�
&���#A�A	c��VP;_uu_4VPVP4.VnRRR4R# +'giR#;ir)r�r�r�r{rs&rr��)TransferCoordinator._run_failure_cleanups�s;���
(�
(�
(����� 5� 5�6�%'�D�"�)�
(�
(�
(�r�c�:�VFpVPV4K	R#r)�
_run_callback)r�	callbacks�callbacks&& rr��"TransferCoordinator._run_callbacks�s��!�H����x�(�"rc�p�V!4R# \d \PRTR2RR7R#i;i)zException raised in r�T)�exc_infoN)�	Exceptionr�r�)rr�s&&rr��!TransferCoordinator._run_callback�s:��	L��J���	L��L�L�/��z��;�d�L�K�	L�s��&5�5)rzr�r|r�rrxr{r�r�rwrvr4r)F)!r#r$r%r&rrrBr�r'rQr�r�r�r�rPrrr!r�r�r�r�rr�r�r�r�r�r�r�r�r�r(r)r*s@rr@r@�s�����4�7�L������
7��
7��&��&�����"
%�(��&�n�)�"5�6�)��6A�1�
4�
��#�&�(�)�L�Lrr@c�Va�]tRtRto]P
tRRltRRltR	Rlt	Rt
VtR#)
�BoundedExecutori�Nc��W nVf
VPpV!VPR7Vn\V4VnW0nR#)a�An executor implementation that has a maximum queued up tasks

The executor will block if the number of tasks that have been
submitted and is currently working on is past its maximum.

:params max_size: The maximum number of inflight futures. An inflight
    future means that the task is either queued up or is currently
    being executed. A size of None or 0 means that the executor will
    have no bound in terms of the number of inflight futures.

:params max_num_threads: The maximum number of threads the executor
    uses.

:type tag_semaphores: dict
:params tag_semaphores: A dictionary where the key is the name of the
    tag and the value is the semaphore to use when limiting the
    number of tasks the executor is processing at a time.

:type executor_cls: BaseExecutor
:param underlying_executor_cls: The executor class that
    get bounded by this executor. If None is provided, the
    concurrent.futures.ThreadPoolExecutor class is used.
N)�max_workers)�_max_num_threads�EXECUTOR_CLS�	_executorr	�
_semaphore�_tag_semaphores)r�max_size�max_num_threads�tag_semaphores�executor_clss&&&&&rrB�BoundedExecutor.__init__�s?��4!0�����,�,�L�%�$�2G�2G�H���'��1���-�rc�J�VPpV'dVPV,pVPVPV4p\	VP
VPV4p\
VPPV\444pVPV4V#)a�Submit a task to complete

:type task: s3transfer.tasks.Task
:param task: The task to run __call__ on


:type tag: s3transfer.futures.TaskTag
:param tag: An optional tag to associate to the task. This
    is used to override which semaphore to use.

:type block: boolean
:param block: True if to wait till it is possible to submit a task.
    False, if not to wait and raise an error if not able to submit
    a task.

:returns: The future associated to the submitted task
)r�r��acquirer4r�release�ExecutorFuturer�r�r
r�)rr�r��block�	semaphore�
acquire_token�release_callbackr�s&&&&    rr��BoundedExecutor.submit�s���$�O�O�	���,�,�S�1�I�"�)�)�$�*:�*:�E�B�
�-����t�/�/��
�� ���� 5� 5�d�K�M� J�K��	� � �!1�2��
rc�<�VPPV4R#r)r��shutdown�rr�s&&rr�BoundedExecutor.shutdown�s��������%r)r�r�r�r�rS)NT�T)r#r$r%r&r�ThreadPoolExecutorr�rBr�rr(r)r*s@rr�r��s&�����-�-�L�.�B&�P&�&rr�c�8a�]tRtRtoRtRtRtRtRtVt	R#)r�i�c��WnR#)acA future returned from the executor

Currently, it is just a wrapper around a concurrent.futures.Future.
However, this can eventually grow to implement the needed functionality
of concurrent.futures.Future if we move off of the library and not
affect the rest of the codebase.

:type future: concurrent.futures.Future
:param future: The underlying future
N��_futurer�s&&rrB�ExecutorFuture.__init__�s	���rc�6�VPP4#r)r
rrs&rr�ExecutorFuture.results���|�|�"�"�$�$rc�Ja�V3RlpVPPV4R#)z�Adds a callback to be completed once future is done

:param fn: A callable that takes no arguments. Note that is different
    than concurrent.futures.Future.add_done_callback that requires
    a single argument for the future.
c�<�S!4#rr
)�future_passed_to_callback�fns&�r�
done_callback�7ExecutorFuture.add_done_callback.<locals>.done_callbacks
����4�KrN)r
r�)rrrs&f rr�� ExecutorFuture.add_done_callback
s���	�	
���&�&�}�5rc�6�VPP4#r)r
rrs&rr�ExecutorFuture.dones���|�|� � �"�"rrN)
r#r$r%r&rBrr�rr(r)r*s@rr�r��s�����%�6� #�#rr�c�>a�]tRtRtoRtRRltRtR	RltRtVt	R#)
�BaseExecutorizABase Executor class implementation needed to work with s3transferNc��R#rr
)rr�s&&rrB�BaseExecutor.__init__!���rc��\R4h)zsubmit()r)rrr�r�s&&*,rr��BaseExecutor.submit$s
��!�*�-�-rc��\R4h)z
shutdown()rrs&&rr�BaseExecutor.shutdown's
��!�,�/�/rr
rr)
r#r$r%r&rrrBr�rr(r)r*s@rrrs����K�
�.�0�0rrc�4a�]tRtRtoRtRtRRltRtVtR#)�NonThreadedExecutori+z@A drop-in replacement non-threaded version of ThreadPoolExecutorc��\4pV!V/VBpVPV4V# \dL\P!4R,wrg\
P
RTTT4TPYg4T#i;i):�NNz0Setting exception for %s to %s with traceback %s)�NonThreadedExecutorFuturer�r��sysr�r�r��set_exception_info)rrr�r�r�rrJ�tbs&&*,    rr��NonThreadedExecutor.submit.s���*�,��	-���(��(�F����f�%��
���	-��L�L�N�2�&�E�A��L�L�B����	
�
�%�%�a�,��
�	-�s�'�AA=�<A=c��R#rr
rs&&rr�NonThreadedExecutor.shutdown>rrr
Nr)	r#r$r%r&rrr�rr(r)r*s@rr$r$+s����J�� 
�
rr$c�Xa�]tRtRtoRtRtRtRtR
RltRt	R	t
R
tRtRt
VtR#)r'iBz�The Future returned from NonThreadedExecutor

Note that this future is **not** thread-safe as it is being used
from the context of a non-threaded environment.
c�L�RVnRVnRVnRVn.VnR#)NF)rwrx�
_traceback�_doner|rs&rrB�"NonThreadedExecutorFuture.__init__Is&�������������
�!��rc�2�WnVP4R#r)rw�	_set_doner�s&&rr��$NonThreadedExecutorFuture.set_resultPs�������rc�>�WnW nVP4R#r)rxr0r4)rrQ�	tracebacks&&&rr)�,NonThreadedExecutorFuture.set_exception_infoTs��#��#�����rNc��VP'd&VPPVP4hVP#r)rx�with_tracebackr0rw)r�timeouts&&rr� NonThreadedExecutorFuture.resultYs.���?�?�?��/�/�0�0����A�A��|�|�rc�j�RVnVPFpVPV4K	.VnR#)TN)r1r|�_invoke_done_callback�rrs& rr4�#NonThreadedExecutorFuture._set_done^s/����
�!�1�1�M��&�&�}�5�2�!��rc��V!V4#rr
r?s&&rr>�/NonThreadedExecutorFuture._invoke_done_callbackds
���T�"�"rc��VP#r)r1rs&rr�NonThreadedExecutorFuture.donegs���z�z�rc��VP'dVPV4R#VPPV4R#r)r1r>r|r�)rrs&&rr��+NonThreadedExecutorFuture.add_done_callbackjs-���:�:�:��&�&�r�*�� � �'�'��+r)r1r|rxrwr0r)r#r$r%r&rrrBr�r)rr4r>rr�r(r)r*s@rr'r'Bs7�����"���
�
"�#��,�,rr'�TaskTag�name�in_memory_upload�in_memory_download)#r��loggingr(r}�collectionsr�
concurrentr�s3transfer.compatr�s3transfer.exceptionsrr�s3transfer.utilsrr	�botocore.contextr
�ImportError�	getLoggerr#r�rr-r;r>r@r�r�rr$r'rG�IN_MEMORY_UPLOAD_TAG�IN_MEMORY_DOWNLOAD_TAGr
rr�<module>rVs�����
��"��$�F�=��,�
�	�	�8�	$��.�.�62�2�"/B�'�/B�d3�#�3�loL�oL�dM&�M&�`"#�"#�J
0�
0�
�,�
�.,,�,,�^�Y���
)���1�2�� �!5�6���u����s�C�
C�C

Youez - 2016 - github.com/yon3zu
LinuXploit