+
    [mh                        ^ RI t ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIt	^ RI
t	^ RIHtHtHtHt ^ RIHtHtHtHtHt ^ RIHtHtHt ^ RI	Ht ^ RIHt ^ RIHt ^ R	IHt ^ R
I H!t!H"t" ^ RI#H$t$H%t% ^ RI&H't' ^ RI(H)t)H*t* ^ RI+H,t, ^ RI-H.t.H/t/H0t0H1t1H2t2 ] Pf                  ! ]44      t5Rs6R t7RRR^]%,          RR3R lt8R.R lt9 ! R R4      t: ! R R]*4      t; ! R R])4      t< ! R R4      t= ! R R]=4      t> ! R R]4      t? ! R  R!4      t@ ! R" R#4      tA ! R$ R%4      tB ! R& R'4      tC ! R( R)4      tD ! R* R+4      tE ! R, R-4      tFR# )/    N)BytesIO)AwsCredentialsAwsCredentialsProviderAwsSigningAlgorithmAwsSigningConfig)ClientBootstrapClientTlsContextDefaultHostResolverEventLoopGroupTlsContextOptions)S3ClientS3RequestTlsModeS3RequestType)UNSIGNED)urlsplit)Config)NoCredentialsError)	ArnParserInvalidArnException)FULL_OBJECT_CHECKSUM_ARGSMB)TransferNotDoneError)BaseTransferFutureBaseTransferMeta)TransferManager)CallArgsOSUtilscreate_nested_clientget_callbacksis_s3express_bucketc                     \         f3   \        P                  P                  V 4      p VP	                  4        Ts \         #   \
         d     R # i ; iN)CRT_S3_PROCESS_LOCKawscrts3CrossProcessLockacquireRuntimeError)namecrt_locks   & 0/usr/lib/python3/dist-packages/s3transfer/crt.pyacquire_crt_s3_process_lockr,   ;   sS     "99--d3	 '  	 		s   A AATc                l   \        V4      p\        V4      p\        Wx4      p	Rp
V'       d   \        P                  M\        P
                  pVeH   \        4       pV'       d   VP                  VR7       MRVn        \        V4      pVP                  4       p
\        VR7      p\        V	V VVVV
VRR7      # )a  
:type region: str
:param region: The region used for signing

:type crt_credentials_provider:
    Optional[awscrt.auth.AwsCredentialsProvider]
:param crt_credentials_provider: CRT AWS credentials provider
    to use to sign requests. If not set, requests will not be signed.

:type num_threads: Optional[int]
:param num_threads: Number of worker threads generated. Default
    is the number of processors in the machine.

:type target_throughput: Optional[int]
:param target_throughput: Throughput target in bytes per second.
    By default, CRT will automatically attempt to choose a target
    throughput that matches the system's maximum network throughput.
    Currently, if CRT is unable to determine the maximum network
    throughput, a fallback target throughput of ``1_250_000_000`` bytes
    per second (which translates to 10 gigabits per second, or 1.16
    gibibytes per second) is used. To set a specific target
    throughput, set a value for this parameter.

:type part_size: Optional[int]
:param part_size: Size, in Bytes, of parts that files will be downloaded
    or uploaded in.

:type use_ssl: boolean
:param use_ssl: Whether or not to use SSL.  By default, SSL is used.
    Note that not all services support non-ssl connections.

:type verify: Optional[boolean/string]
:param verify: Whether or not to verify SSL certificates.
    By default SSL certificates are verified.  You can provide the
    following values:

    * False - do not validate SSL certificates.  SSL will still be
        used (unless use_ssl is False), but SSL certificates
        will not be verified.
    * path/to/cert/bundle.pem - A filename of the CA cert bundle to
        use. Specify this argument if you want to use a custom CA cert
        bundle instead of the default one on your system.
N)ca_filepathF) provided_throughput_target_bytesT)	bootstrapregioncredential_provider	part_sizetls_modetls_connection_optionsthroughput_target_gbpsenable_s3express)r   r
   r   r   ENABLEDDISABLEDr   &override_default_trust_store_from_pathverify_peerr	   new_connection_options_get_crt_throughput_target_gbpsr   )r1   crt_credentials_providernum_threadstarget_throughputr3   use_sslverifyevent_loop_grouphost_resolverr0   r5   r4   tls_ctx_optionsclient_tls_optiontarget_gbpss   &&&&&&&        r+   create_s3_crt_clientrH   T   s    h &k2'(89M 0@I! %,  1A1J1J  +-BB" C  +0O',_=!2!I!I!K1):K 45*	 	    c                     V f<   \         P                  P                  4       p\        P	                  RV4       Vf   RpMV ^,          R,          p\        P	                  RV4       V# )Nz-Recommended CRT throughput target in gbps: %sg      $@i ʚ;z'Using CRT throughput target in gbps: %s)r$   r%   &get_recommended_throughput_target_gbpsloggerdebug)r/   rG   s   & r+   r=   r=      s_    '/iiFFH;[	
 K 7:]J
LL:KHrI   c                      a  ] tR t^t o ]P
                  t]P                  t]P                  tRt]P                  t	RR lt
R tR tRR ltRR ltRR ltRR	 ltR
 tR tR tR tR tR tRR ltR tR tRtV tR# )CRTTransferManagerTNc                    Vf   \        4       V n        Wn        \        W P                  4      V n        VP
                  V n        . V n        \        P                  ! ^4      V n
        ^ V n        R# )a  A transfer manager interface for Amazon S3 on CRT s3 client.

:type crt_s3_client: awscrt.s3.S3Client
:param crt_s3_client: The CRT s3 client, handling all the
    HTTP requests and functions under then hood

:type crt_request_serializer: s3transfer.crt.BaseCRTRequestSerializer
:param crt_request_serializer: Serializer, generates unsigned crt HTTP
    request.

:type osutil: s3transfer.utils.OSUtils
:param osutil: OSUtils object to use for os-related behavior when
    using with transfer manager.
N)r   _osutil_crt_s3_clientS3ClientArgsCreator_s3_args_creatortranslate_crt_exception_crt_exception_translator_future_coordinators	threading	Semaphore
_semaphore_id_counter)selfcrt_s3_clientcrt_request_serializerosutils   &&&&r+   __init__CRTTransferManager.__init__   sc     >"9DL+ 3"LL!
 #:: 	& %'!#--c2rI   c                    V # r"    r\   s   &r+   	__enter__CRTTransferManager.__enter__   s    rI   c                @    R pV'       d   RpV P                  V4       R# )FTN	_shutdown)r\   exc_type	exc_valueargscancels   &&&* r+   __exit__CRTTransferManager.__exit__   s    FvrI   c                    Vf   / pVf   / pV P                  W@P                  4       V P                  V4       \        VVVVVR7      pV P	                  RV4      # )Nbucketkeyfileobj
extra_argssubscribers
get_object)_validate_all_known_argsALLOWED_DOWNLOAD_ARGS_validate_if_bucket_supportedr   _submit_transfer)r\   rr   rs   rt   ru   rv   callargss   &&&&&& r+   downloadCRTTransferManager.download   sj     JK%%j2L2LM**62!#
 $$\8<<rI   c                    Vf   / pVf   / pV P                  W@P                  4       V P                  V4       V P                  V4       \	        VVVVVR7      pV P                  RV4      # )Nrq   
put_object)rx   ALLOWED_UPLOAD_ARGSrz   &_validate_checksum_algorithm_supportedr   r{   )r\   rt   rr   rs   ru   rv   r|   s   &&&&&& r+   uploadCRTTransferManager.upload   sv    JK%%j2J2JK**6233J?!#
 $$\8<<rI   c                    Vf   / pVf   / pV P                  W0P                  4       V P                  V4       \        VVVVR7      pV P	                  RV4      # )N)rr   rs   ru   rv   delete_object)rx   ALLOWED_DELETE_ARGSrz   r   r{   )r\   rr   rs   ru   rv   r|   s   &&&&& r+   deleteCRTTransferManager.delete  se    JK%%j2J2JK**62!#	
 $$_h??rI   c                (    V P                  V4       R # r"   rh   r\   rm   s   &&r+   shutdownCRTTransferManager.shutdown  s    vrI   c                    V P                   '       dN   V P                  P                  4        F-  w  r#VP                  V4      pV'       g   K   \	        R V R24      h	  R# R# )z'TransferManager methods do not support z+ resource. Use direct client calls instead.N) VALIDATE_SUPPORTED_BUCKET_VALUES_UNSUPPORTED_BUCKET_PATTERNSitemsmatch
ValueError)r\   rr   resourcepatternr   s   &&   r+   rz   0CRTTransferManager._validate_if_bucket_supported  sf     000%)%F%F%L%L%N!f-5$A( LE E  &O 1rI   c           	     d    V F)  pW29  g   K  \        R V RRP                  V4       24      h	  R# )zInvalid extra_args key 'z', must be one of: z, N)r   join)r\   actualallowedkwargs   &&& r+   rx   +CRTTransferManager._validate_all_known_args,  s?    E# .ug 6''+yy'9&:<  rI   c                    VP                  R 4      pVf   R# \        \        P                  P                  P
                  4      pVP                  4       V9  d   \        RV RV 24      hR# )ChecksumAlgorithmNzChecksumAlgorithm: z* not supported. Supported algorithms are: )getlistr$   r%   S3ChecksumAlgorithm__members__upperr   )r\   ru   checksum_algorithmsupported_algorithmss   &&  r+   r   9CRTTransferManager._validate_checksum_algorithm_supported4  su    '^^,?@%#FII$A$A$M$MN##%-AA%&8%9 :--A,BD  BrI   c                |    V P                    F+  pVP                  4       '       d   K  VP                  4        K-  	  R # r"   )rW   donerm   r\   coordinators   & r+   _cancel_transfers$CRTTransferManager._cancel_transfers?  s-    44K##%%""$ 5rI   c                L    V P                    F  pVP                  4        K  	  R # r"   )rW   resultr   s   & r+   _finish_transfers$CRTTransferManager._finish_transfersD  s    44K  5rI   c                L    V P                    F  pVP                  4        K  	  R # r"   )rW   %wait_until_on_done_callbacks_completer   s   & r+   _wait_transfers_done'CRTTransferManager._wait_transfers_doneH  s    44K==? 5rI   c                    V'       d   V P                  4         V P                  4        V P	                  4        R #   \         d    T P                  4         L/\         d     L;i ; i  T P	                  4        i ; ir"   )r   r   KeyboardInterrupt	Exceptionr   r   s   &&r+   ri   CRTTransferManager._shutdownL  sg    ""$	(""$ %%' ! 	%""$ 		 %%'s3   < A&A) A&"A&#A) %A&&A) )A;c                :    V P                   P                  4        R # r"   )rZ   releaser\   kwargss   &,r+   _release_semaphore%CRTTransferManager._release_semaphoreY  s    !rI   c                   V P                   .p\        V P                  V P                  R 7      pR\	        V P                  V4      RV/p\        R	/ VB p\        V4      pVP                  V4        V P                  P                  4        V P                  P                  VR4      pV! 4        V P                  P                  VVVVV4      p	V P                  P                  ! R	/ V	B p
VP                  V
4       V P$                  P                  V4       V ;P                  ^,          un        V#   \          dD   pTP#                  TR4       T P                  P                  TRTR7      pT! TR7        Rp?LRp?ii ; i)
)transfer_idexception_translatormetar   queuedTr   )after_subscribers)errorNrc   )r   CRTTransferCoordinatorr[   rV   CRTTransferMetaCRTTransferFutureAfterDoneHandlerappendrZ   r'   rT   get_crt_callbackget_make_request_argsrR   make_requestset_s3_requestr   set_exceptionrW   )r\   request_type	call_argson_done_after_callsr   
componentsfuture	afterdone	on_queuedcrt_callargscrt_s3_requesteon_dones   &&&          r+   r{   #CRTTransferManager._submit_transfer\  sw   #667,((!%!?!?

 OD$4$4i@;

 #0Z0$[1	""9-	7OO##%-->>I K00FF#L "00==MMN &&~6!!((5A  	%%a.++<<2E = G !	s   1A8D0 0E>;9E99E>)rV   rR   rW   r[   rQ   rT   rZ   r"   NNF)__name__
__module____qualname____firstlineno__r   ry   r   r   r   r   r`   re   rn   r}   r   r   r   rz   rx   r   r   r   r   ri   r   r{   __static_attributes____classdictcell____classdict__s   @r+   rO   rO      s     +AA)==)=='+$#2#O#O :=$="@	%
!@("' 'rI   rO   c                   ^   a  ] tR tRt o RtR	R lt]R 4       t]R 4       t]R 4       t	Rt
V tR# )
r   i  z*Holds metadata about the CRTTransferFutureNc                ,    Wn         W n        / V n        R # r"   )_transfer_id
_call_args_user_context)r\   r   r   s   &&&r+   r`   CRTTransferMeta.__init__  s    '#rI   c                    V P                   # r"   )r   rd   s   &r+   r   CRTTransferMeta.call_args  s    rI   c                    V P                   # r"   )r   rd   s   &r+   r   CRTTransferMeta.transfer_id  s       rI   c                    V P                   # r"   )r   rd   s   &r+   user_contextCRTTransferMeta.user_context  s    !!!rI   )r   r   r   r   )r   r   r   r   __doc__r`   propertyr   r   r   r   r   r   s   @r+   r   r     sI     4 
   ! ! " "rI   r   c                   V   a  ] tR tRt o R
R lt]R 4       tR tRR ltR t	R t
R	tV tR# )r   i  Nc                D    Wn         Vf   \        4       V n         W n        R# )a2  The future associated to a submitted transfer request via CRT S3 client

:type meta: s3transfer.crt.CRTTransferMeta
:param meta: The metadata associated to the transfer future.

:type coordinator: s3transfer.crt.CRTTransferCoordinator
:param coordinator: The coordinator associated to the transfer future.
N)_metar   _coordinator)r\   r   r   s   &&&r+   r`   CRTTransferFuture.__init__  s     
<(*DJ'rI   c                    V P                   # r"   )r   rd   s   &r+   r   CRTTransferFuture.meta  s    zzrI   c                6    V P                   P                  4       # r"   )r   r   rd   s   &r+   r   CRTTransferFuture.done  s      %%''rI   c                <    V P                   P                  V4       R # r"   )r   r   r\   timeouts   &&r+   r   CRTTransferFuture.result  s      )rI   c                :    V P                   P                  4        R # r"   )r   rm   rd   s   &r+   rm   CRTTransferFuture.cancel  s      "rI   c                    V P                  4       '       g   \        R4      hV P                  P                  VRR7       R# )z!Sets the exception on the future.z?set_exception can only be called once the transfer is complete.T)overrideN)r   r   r   r   r\   	exceptions   &&r+   r   CRTTransferFuture.set_exception  s:    yy{{&  	''	D'ArI   )r   r   r   r"   )r   r   r   r   r`   r   r   r   r   rm   r   r   r   r   s   @r+   r   r     s9     (  (*#B BrI   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )BaseCRTRequestSerializeri  c                    \        R4      h)a4  Serialize CRT HTTP requests.

:type transfer_type: string
:param transfer_type: the type of transfer made,
    e.g 'put_object', 'get_object', 'delete_object'

:type future: s3transfer.crt.CRTTransferFuture

:rtype: awscrt.http.HttpRequest
:returns: An unsigned HTTP request to be used for the CRT S3 client
zserialize_http_request()NotImplementedError)r\   transfer_typer   s   &&&r+   serialize_http_request/BaseCRTRequestSerializer.serialize_http_request  s     ""<==rI   c                    \        R 4      h)ztranslate_crt_exception()r  r  s   &&r+   rU   0BaseCRTRequestSerializer.translate_crt_exception  s    !"=>>rI   rc   N)r   r   r   r   r  rU   r   r   r   s   @r+   r
  r
    s     >? ?rI   r
  c                   l   a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tR tR tR tR tRtV tR# )BotocoreCRTRequestSerializeri  Nc                2   Wn         Vf   / pV P                  W4       \        V3/ VB V n        V P                  P                  P
                  P                  RV P                  4       V P                  P                  P
                  P                  RV P                  4       V P                  P                  P
                  P                  RV P                  4       V P                  P                  P
                  P                  RV P                  4       R# )a  Serialize CRT HTTP request using botocore logic
It also takes into account configuration from both the session
and any keyword arguments that could be passed to
`Session.create_client()` when serializing the request.

:type session: botocore.session.Session

:type client_kwargs: Optional[Dict[str, str]])
:param client_kwargs: The kwargs for the botocore
    s3 client initialization.
Nzrequest-created.s3.*zafter-call.s3.*zbefore-send.s3.*zbefore-call.s3.*)_session_resolve_client_configr   _clientr   eventsregister_capture_http_request+_change_response_to_serialized_http_request_make_fake_http_response_remove_checksum_context)r\   sessionclient_kwargss   &&&r+   r`   %BotocoreCRTRequestSerializer.__init__  s       M##G;+GE}E  ))"D$>$>	
 	  ))tOO	
 	  )) = =	
 	  )) = =	
rI   c                    R pVP                  4       '       d   VP                  4       pRV9   d
   VR,          p\        \        R7      pV'       d   VP                  V4      pWBR&   RVR&   R # )Nconfig)signature_versionr%   service_name)get_default_client_configr   r   merge)r\   r  r   user_provided_configclient_configs   &&&  r+   r  3BotocoreCRTRequestSerializer._resolve_client_config  sh    #,,..#*#D#D#F }$#0#: :066}EM"/h(,n%rI   c                   \        VP                  4      pVP                  pVP                  '       d   V R VP                   2p. pVP                  P                  4        FL  w  rV\        V\        4      '       d   VP                  WV34       K/  VP                  V\        VR4      34       KN  	  \        P                  P                  V4      p\        P                  P                  VP                  VVVP                  R7      pV# )?zutf-8)methodpathheadersbody_stream)r   urlr.  queryr/  r   
isinstancestrr   r$   httpHttpHeadersHttpRequestr-  body)	r\   aws_request	url_partscrt_pathheaders_listr)   valuecrt_headerscrt_requests	   &&       r+   _crt_request_from_aws_request:BotocoreCRTRequestSerializer._crt_request_from_aws_request   s    [__-	>>???"1Y__$56H&..446KD%%%##TM2##T3ug+>$?@	 7 kk--l;kk--%%#((	 . 
 rI   c                F   V P                  V4      pVP                  P                  R 4      f<   \        VP                  4      pVP                  P                  R VP                  4       VP                  P                  R4      e   VP                  P                  R4       VP                  P                  R4      f+   VP                  f   VP                  P                  RR4       VP                  P                  R4      e   VP                  P                  R4       V# )hostzContent-MD5zContent-Length0zTransfer-Encoding)
r@  r/  r   r   r1  setnetlocremover8  add)r\   botocore_http_requestr?  r:  s   &&  r+   _convert_to_crt_http_request9BotocoreCRTRequestSerializer._convert_to_crt_http_request  s    889NO""6*2 !6!:!:;I##FI,<,<=""=1=&&}5 ""#34<$))1##''(8#> ""#67C&&':;rI   c                "    WP                   R &   R# )http_requestN)contextr\   requestr   s   &&,r+   r  2BotocoreCRTRequestSerializer._capture_http_request4  s    *1'rI   c                >    VR ,          pVP                  4       VR&   R# )rM  HTTPRequestN)prepare)r\   rN  parsedr   rP  s   &&&, r+   r  HBotocoreCRTRequestSerializer._change_response_to_serialized_http_request7  s     .) ' 1}rI   c                X    \         P                  P                  R ^/ \        R4      4      # )NrI   )botocore
awsrequestAWSResponseFakeRawResponserO  s   &&,r+   r  5BotocoreCRTRequestSerializer._make_fake_http_response=  s,    ""..C 	
 	
rI   c                    \        V P                  V4      ! RR VP                  RVP                  /VP                  B R,          # )BucketKeyrS  rc   )getattrr  rr   rs   ru   )r\   client_methodr   s   &&&r+   _get_botocore_http_request7BotocoreCRTRequestSerializer._get_botocore_http_requestE  sJ    t||]3 
##
)2
:C:N:N

 	rI   c                r    V P                  WP                  P                  4      pV P                  V4      pV# r"   )rb  r   r   rJ  )r\   r  r   rI  r?  s   &&&  r+   r  3BotocoreCRTRequestSerializer.serialize_http_requestJ  s9     $ ? ?;;00!
 778MNrI   c                |    \        V\        P                  P                  4      '       d   V P	                  V4      # R # r"   )r3  r$   r%   S3ResponseError _translate_crt_s3_response_errorr  s   &&r+   rU   4BotocoreCRTRequestSerializer.translate_crt_exceptionQ  s-    i!:!:;;88CCrI   c                Z   VP                   pVR 8  d   R# VP                   UUu/ uF  w  r4W4bK	  	  pppVP                  pVe=   V P                  P                  P
                  pVP                  V4      P                  pMRpR\        P                  P                  V4      RVRVP                  /p	V P                  P                  P                  WR7      p
V
P                  R/ 4      P                  R4      pV P                  P                  P!                  V4      pV! WR7      # u uppi )	i-  Nr/  status_coder8  )shapeErrorCode)operation_name)rk  r/  ro  r  r   service_modeloperation_modeloutput_shaperX  rY  HeadersDictr8  _response_parserparser   
exceptions	from_code)r\   s3_response_errorrk  kvr/  ro  rp  rl  response_dictparsed_response
error_codeerror_classs   &&           r+   rh  =BotocoreCRTRequestSerializer._translate_crt_s3_response_errorW  s   '33 $5$=$=>$=DA14$=>*99% LL--;;M!11.ANNEE x**66w?;%**

 ,,77== > 
 %(("599&A
ll--77
C?JJ' ?s   D'c                B    VP                  R / 4      pRV9   d   VR R# R# )rN  checksumN)r   )r\   paramsr   request_contexts   &&, r+   r  5BotocoreCRTRequestSerializer._remove_checksum_contexts  s'     **Y3(
+ )rI   )r  r  r"   )r   r   r   r   r`   r  r@  rJ  r  r  r  rb  r  rU   rh  r  r   r   r   s   @r+   r  r    sG     
<-,<22

K8, ,rI   r  c                   *   a  ] tR tRt o RR ltRtV tR# )r[  iy  Nc              #  N   "    V P                  V4      pV'       g   R# Vx  K"  5i)TN)read)r\   amtdecode_contentchunks   &&& r+   streamFakeRawResponse.streamz  s      IIcNEKs   %%rc   )i   N)r   r   r   r   r  r   r   r   s   @r+   r[  r[  y  s      rI   r[  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )BotocoreCRTCredentialsWrapperi  c                    Wn         R # r"   _resolved_credentials)r\   resolved_botocore_credentialss   &&r+   r`   &BotocoreCRTCredentialsWrapper.__init__  s    %B"rI   c                    V P                  4       P                  4       p\        VP                  VP                  VP
                  4      # r"   )_get_credentialsget_frozen_credentialsr   
access_key
secret_keytoken)r\   credentialss   & r+   __call__&BotocoreCRTCredentialsWrapper.__call__  s?    ++-DDF""K$:$:K<M<M
 	
rI   c                .    \         P                  ! V 4      # r"   )r   new_delegaterd   s   &r+   to_crt_credentials_provider9BotocoreCRTCredentialsWrapper.to_crt_credentials_provider  s    %22488rI   c                J    V P                   f   \        4       hV P                   # r"   )r  r   rd   s   &r+   r  .BotocoreCRTCredentialsWrapper._get_credentials  s#    %%-$&&)))rI   r  N)
r   r   r   r   r`   r  r  r  r   r   r   s   @r+   r  r    s     C
9* *rI   r  c                   z   a  ] tR tRt o RtRR lt]R 4       tR tRR lt	RR lt
R	 tRR
 ltR tR tR tRtV tR# )r   i  z-A helper class for managing CRTTransferFutureNc                    Wn         W0n        W n        \        P                  ! 4       V n        R V n        R V n        \        P                  ! 4       V n	        R # r"   )
r   _exception_translator_s3_requestrX   Lock_lock
_exception_crt_futureEvent_done_event)r\   r   
s3_requestr   s   &&&&r+   r`   CRTTransferCoordinator.__init__  sB     '%9"%^^%
$??,rI   c                    V P                   # r"   )r  rd   s   &r+   r  !CRTTransferCoordinator.s3_request  s    rI   c                :    V P                   P                  4        R # r"   )r  rE  rd   s   &r+   set_done_callbacks_complete2CRTTransferCoordinator.set_done_callbacks_complete  s    rI   c                <    V P                   P                  V4       R # r"   )r  waitr   s   &&r+   r   <CRTTransferCoordinator.wait_until_on_done_callbacks_complete  s    g&rI   c                    V P                   ;_uu_ 4        V P                  4       '       d	   V'       d   Wn        R R R 4       R #   + '       g   i     R # ; ir"   )r  r   r  )r\   r  r  s   &&&r+   r   $CRTTransferCoordinator.set_exception  s)    ZZZ99;;("+ ZZZs   AAA	c                b    V P                   '       d   V P                   P                  4        R # R # r"   )r  rm   rd   s   &r+   rm   CRTTransferCoordinator.cancel  s%    ##% rI   c                   V P                   '       d   V P                   h V P                  P                  V4       T P                  '       d
   R T n        R # R #   \         d.    T P	                  4        T P                  P                  T4       h \
         d   pT P                  T4        R p?LtR p?ii ; i  T P                  '       d	   R T n        i i ; ir"   )r  r  r   r   rm   r   handle_exceptionr  )r\   r   r   s   && r+   r   CRTTransferCoordinator.result  s    ???//!
	(##G, #'    ! 	KKM##G, 	%!!!$$	% #'   s/   A ?B4B4B/*B7 /B44B7 7Cc                    R pV P                   '       d    V P                  V4      pVe   W!hVh  \         d"   p\        P                  RTR7        R p?L/R p?ii ; i)NzUnable to translate exception.)exc_info)r  r   rL   rM   )r\   exctranslated_excr   s   &&  r+   r  'CRTTransferCoordinator.handle_exception  sc    %%%!%!;!;C!@ % )I   =J	s   / AAAc                V    V P                   f   R# V P                   P                  4       # )NF)r  r   rd   s   &r+   r   CRTTransferCoordinator.done  s&    #$$&&rI   c                H    Wn         V P                   P                  V n        R # r"   )r  finished_futurer  )r\   r  s   &&r+   r   %CRTTransferCoordinator.set_s3_request  s    %++;;rI   )r  r  r  r  r  r  r   )NNNr"   r   )r   r   r   r   r   r`   r   r  r  r   r   rm   r   r  r   r   r   r   r   s   @r+   r   r     sN     7	-    ',
&('
< <rI   r   c                   H   a  ] tR tRt o R tR tR
R ltR tR tR t	R	t
V tR# )rS   i  c                    Wn         W n        R # r"   )_request_serializer	_os_utils)r\   r^   os_utilss   &&&r+   r`   S3ClientArgsCreator.__init__  s    #9 !rI   c           	     R    \        V R V 2V P                  4      pV! VVVV. VR7      # )_get_make_request_args_r   r   r   r   on_done_before_callsr   )r`  _default_get_make_request_args)r\   r   r   r   r   r   request_args_handlers   &&&&&& r+   r   )S3ClientArgsCreator.get_make_request_args  sF      '%l^4// 

 $%#!# 3
 	
rI   Nc                    aaaa VVVV3R  lpV# )c                     < . pSe
   VS,          pV\        SS4      ,          pSe
   VS,          pV F$  pSR8X  d   V! V ^ ,          R7       K  V! V / VB  K&  	  R # )Nprogress)bytes_transferred)r   )rl   r   callbacks_listcallbackr   before_subscriberscallback_typer   s   *,  r+   invoke_all_callbacksBS3ClientArgsCreator.get_crt_callback.<locals>.invoke_all_callbacks  sh    N!-"44mFMBBN ,"33* !J.tAw7d-f- +rI   rc   )r\   r   r  r  r   r  s   &ffff r+   r   $S3ClientArgsCreator.get_crt_callback  s    	. 	.  $#rI   c           	       a R p\        SP                  \        4      '       d8   SP                  pV P                  P	                  V4      pVSP
                  R&   MSP                  SP
                  R&   R p	\        ;QJ d#    V3R l\         4       F  '       g   K   RM	  RM! V3R l\         4       4      '       g   SP
                  P                  RR4      P                  4       p
\        P                  P                  \        P                  P                  V
,          \        P                  P                  P                  R7      p	R	SP
                  R
&   V P!                  VSVVVVR7      pW{R&   WR&   V# )NContentLengthBodyc              3   B   <"   T F  pVSP                   9   x  K  	  R # 5ir"   )ru   ).0checksum_argr   s   & r+   	<genexpr>HS3ClientArgsCreator._get_make_request_args_put_object.<locals>.<genexpr>  s#      
 9 I000 9s   TFr   CRC32)	algorithmlocationzoverride-to-be-removed
ContentMD5r  send_filepathchecksum_config)r3  rt   r4  r  get_file_sizeru   anyr   popr   r$   r%   S3ChecksumConfigr   S3ChecksumLocationTRAILERr  )r\   r   r   r   r   r  r   r  data_lenr  r   make_request_argss   &&f&&&&     r+   !_get_make_request_args_put_object5S3ClientArgsCreator._get_make_request_args_put_object  sS    i''--%--M~~33MBH4<I  1+4+<+<I  (s 
 9
sss 
 9
 
 
 "+!5!5!9!9#W"eg  %ii88 ))778JK55== 9 O .F	\* ??%#!5 3 @ 
 .;/*/>+,  rI   c           	        R pR p\         P                  P                  RR7      p	\        VP                  \
        4      '       dN   VP                  p
V P                  P                  V
4      pVP                  \        W:WpP                  4      4       M\        VP                  4      pV P                  VVVVVVR7      pW{R&   WR&   WR&   V# )NT)validate_responser  recv_filepathon_bodyr  )r$   r%   r  r3  rt   r4  r  get_temp_filenamer   RenameTempFileHandlerOnBodyFileObjWriterr  )r\   r   r   r   r   r  r   r  r  r  final_filepathr  s   &&&&&&&     r+   !_get_make_request_args_get_object5S3ClientArgsCreator._get_make_request_args_get_object<  s      ))44t4Li''--&..N NN<<^LM ''% *)*;*;<G ??%#!5 3 @ 
 .;/*'.)$/>+,  rI   c                   R V P                   P                  W4      R\        \        VP	                  4       \        P
                  4      RV P                  VRWV4      RV P                  VR4      /pVR,          \        P
                  8X  d+   RP                  R VP                  R4       4       4      VR	&   \        4       pVP                  VP                  4      ;p	'       d?   V	R
,          R8X  d1   \        \        P                  RRRR7      VR&   V	R,          Vn        V# \        VP                  4      '       d    \        \        P                   RRR7      VR&   V# )rP  typer   r   on_progressr   c              3   @   "   T F  qP                  4       x  K  	  R # 5ir"   )title)r  xs   & r+   r  ES3ClientArgsCreator._default_get_make_request_args.<locals>.<genexpr>y  s      :#:a		#:s   _ro  r1   *F)r  r1   use_double_uri_encodeshould_normalize_uri_pathsigning_configresource_name)r  r  r  )r  r  r`  r   r   DEFAULTr   r   split_S3ArnParamHandler
handle_arnrr   r   r   V4_ASYMMETRICr    V4_S3EXPRESS)
r\   r   r   r   r   r  r   r  arn_handleraccesspoint_arn_detailss
   &&&&&&&   r+   r  2S3ClientArgsCreator._default_get_make_request_args`  sf    t//FF G|113]5J5J t,, 4 400D
 V$(=(==24'' :#/#5#5c#:: 3./ )*'2'='=i>N>N'OO#O%h/25
 3C-;;&+*/	3./  7GI !  !!1!122 3C-::&+*/3./
 ! rI   )r  r  r   )r   r   r   r   r`   r   r   r  r   r  r   r   r   s   @r+   rS   rS     s*     "
"$2-!^"!H4! 4!rI   rS   c                   ,   a  ] tR tRt o R tR tRtV tR# )r  i  c                6    Wn         W n        W0n        W@n        R # r"   )r   _final_filename_temp_filenamerQ   )r\   r   final_filenametemp_filenamer_   s   &&&&&r+   r`   RenameTempFileHandler.__init__  s    '-+rI   c                   VR ,          pV'       d(   V P                   P                  V P                  4       R#  V P                   P                  V P                  V P                  4       R#   \
         dL   pT P                   P                  T P                  4       T P                  P                  T4        Rp?R# Rp?ii ; i)r   N)rQ   remove_filer  rename_filer  r   r   r   )r\   r   r   r   s   &,  r+   r  RenameTempFileHandler.__call__  s    wLL$$T%8%893(('')=)=  3(()<)<=!!//223s   0A, ,C7A B==C)r   r  rQ   r  Nr   r   r   r   r`   r  r   r   r   s   @r+   r  r    s     3 3rI   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )r   i  c                    Wn         R # r"   r   r   s   &&r+   r`   AfterDoneHandler.__init__  s    'rI   c                :    V P                   P                  4        R # r"   )r   r  r   s   &,r+   r  AfterDoneHandler.__call__  s    557rI   r'  Nr$  r   s   @r+   r   r     s     (8 8rI   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )r  i  c                    Wn         R # r"   _fileobj)r\   rt   s   &&r+   r`   OnBodyFileObjWriter.__init__  s    rI   c                <    V P                   P                  V4       R # r"   )r.  write)r\   r  r   s   &&,r+   r  OnBodyFileObjWriter.__call__  s    E"rI   r-  Nr$  r   s   @r+   r  r    s      # #rI   r  c                   `   a  ] tR tRt o Rt]P                  ! R4      tR tR t	R t
R tRtV tR	# )
r  i  zPartial port of S3ArnParamHandler from botocore.

This is used to make a determination on MRAP accesspoints for signing
purposes. This should be safe to remove once we properly integrate auth
resolution from Botocore into the CRT transfer integration.
zA^(?P<resource_type>accesspoint|outpost)[/:](?P<resource_name>.+)$c                $    \        4       V n        R # r"   )r   _arn_parserrd   s   &r+   r`   _S3ArnParamHandler.__init__  s    $;rI   c                T    V P                  V4      pVf   R # VR,          R8X  d   V# R # )Nresource_typeaccesspoint)_get_arn_details_from_bucketr\   rr   arn_detailss   && r+   r  _S3ArnParamHandler.handle_arn  s3    77?'=8 9rI   c                     V P                   P                  V4      pV P                  V4       V#   \         d     R # i ; ir"   )r5  	parse_arn_add_resource_type_and_namer   r;  s   && r+   r:  /_S3ArnParamHandler._get_arn_details_from_bucket  sF    	**44V<K,,[9" 		s   -0 ??c                    V P                   P                  VR ,          4      pV'       d+   VP                  R4      VR&   VP                  R4      VR&   R# R# )r   r8  r  N)_RESOURCE_REGEXr   group)r\   r<  r   s   && r+   r@  ._S3ArnParamHandler._add_resource_type_and_name  sK    $$**;z+BC+0;;+GK(+0;;+GK( rI   )r5  N)r   r   r   r   r   recompilerC  r`   r  r:  r@  r   r   r   s   @r+   r  r    s8      jjLO'H HrI   r  r"   )GloggingrF  rX   ior   awscrt.httpr$   	awscrt.s3botocore.awsrequestrX  botocore.sessionawscrt.authr   r   r   r   	awscrt.ior   r	   r
   r   r   r   r   r   r   botocore.compatr   botocore.configr   botocore.exceptionsr   botocore.utilsr   r   s3transfer.constantsr   r   s3transfer.exceptionsr   s3transfer.futuresr   r   s3transfer.managerr   s3transfer.utilsr   r   r   r   r    	getLoggerr   rL   r#   r,   rH   r=   rO   r   r   r
  r  r[  r  r   rS   r  r   r  r  rc   rI   r+   <module>rZ     s@    	         @ ?  $ " 2 9 > 6 C .  
		8	$ 6 ""fRj$H HV"& "*#B* #BL? ?&b,#; b,Jg * *&F< F<Rv! v!r3 3,8 8# ##H #HrI   