+
    šÜin9  ã                   ób  € ^ RI t ^ RIt^ RIt^ RIHt ^ RIHtHtHtH	t	H
t
 ]P                  ! ]4      tR]]]
]	./tR tR tRR ltRR ltRR	 ltR
 tR tR 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      t ! R R]4      tR# )é    N)Úcrc32)ÚChecksumErrorÚConnectionClosedErrorÚConnectionErrorÚEndpointConnectionErrorÚReadTimeoutErrorÚGENERAL_CONNECTION_ERRORc                ó–   € V R8X  d   \         P                   ! 4       p MV ^ 8:  d   \        RV  24      hWV^,
          ,          ,          pV# )a  Calculate time to sleep based on exponential function.

The format is::

    base * growth_factor ^ (attempts - 1)

If ``base`` is set to 'rand' then a random number between
0 and 1 will be used as the base.
Base must be greater than 0, otherwise a ValueError will be
raised.

Úrandz.The 'base' param must be greater than 0, got: )ÚrandomÚ
ValueError)ÚbaseÚgrowth_factorÚattemptsÚtime_to_sleeps   &&& Ú7/usr/lib/python3/dist-packages/botocore/retryhandler.pyÚdelay_exponentialr   +   sM   € ð ˆv„~Ü�}Š}‹‰Ø	�ŒÜØ<¸T¸FÐCó
ð 	
ð ¨h¸­lÕ;Õ<€MØÐó    c                ó:   € \         P                  ! \        WR7      # )z›Create an exponential delay function based on the attempts.

This is used so that you only have to pass it the attempts
parameter to calculate the delay.

©r   r   )Ú	functoolsÚpartialr   r   s   &&r   Ú!create_exponential_delay_functionr   B   s   € ô ×ÒÜ ôð r   c                 óJ   € \        WR 7      p\        WR 7      p\        W#R7      # ))Úoperation_name)ÚcheckerÚaction)Ú create_checker_from_retry_configÚcreate_retry_action_from_configÚRetryHandler)Úconfigr   r   r   s   &&  r   Úcreate_retry_handlerr"   N   s+   € Ü.Øô€Gô -Øô€Fô  Ô7Ð7r   c                 óx   € V R ,          R,          pVR,          R8X  d   \        VR,          VR,          R7      # R# )Ú__default__ÚdelayÚtypeÚexponentialr   r   r   N)r   )r!   r   Údelay_configs   && r   r   r   X   sB   € ð
 ˜-Õ(¨Õ1€LØ�FÕ˜}Ô,Ü0Ø˜fÕ%Ø& Õ7ô
ð 	
ñ -r   c                 ó‚  € . pR p. pRV 9   dw   V R,          P                  R. 4      pV R,          R,          pV FG  pWV,          pVP                  \        V4      4       \        V4      pVf   K6  VP	                  V4       KI  	  Vet   V P                  V4      ea   W,          R,          p	V	 FK  pVP                  \        W–,          4      4       \        W–,          4      pVf   K:  VP	                  V4       KM  	  \        V4      ^8X  d   \        V^ ,          VR7      # \        V4      p
\        V
V\        V4      R7      # )Nr$   ÚpoliciesÚmax_attempts)r+   )r+   Úretryable_exceptions)	ÚgetÚappendÚ_create_single_checkerÚ_extract_retryable_exceptionÚextendÚlenÚMaxAttemptsDecoratorÚMultiCheckerÚtuple)r!   r   Úcheckersr+   r,   r*   ÚkeyÚcurrent_configÚretry_exceptionÚoperation_policiesÚmulti_checkers   &&         r   r   r   e   s0  € Ø€HØ€LØÐØ˜ÔØ˜-Õ(×,Ñ,¨Z¸Ó<ˆØ˜mÕ,¨^Õ<ˆÛˆCØ%�]ˆNØ�O‰OÔ2°>ÓBÔCÜ:¸>ÓJˆOØÔ*Ø$×+Ñ+¨OÖ<ñ ð Ò! f§j¡j°Ó&@Ò&LØ#Õ3°JÕ?ÐÛ%ˆCØ�O‰OÔ2Ð3EÕ3JÓKÔLÜ:Ø"Õ'óˆOð Ô*Ø$×+Ñ+¨OÖ<ñ &ô ˆ8ƒ}˜Ôä# H¨Q¥K¸lÔKÐKä$ XÓ.ˆÜ#ØØ%Ü!&Ð';Ó!<ô
ð 	
r   c                 ó„   € R V R,          9   d   \        V R,          R ,          4      # RV R,          9   d   \        4       # R# )ÚresponseÚapplies_whenÚsocket_errorsN)Ú_create_single_response_checkerÚExceptionRaiser)r!   s   &r   r/   r/   ‡   sF   € Ø�V˜NÕ+Ô+Ü.Ø�>Õ" :Õ.ó
ð 	
ð 
˜F >Õ2Ô	2ÜÓ Ð ñ 
3r   c                 óÐ   € R V 9   d   \        V R,          V R ,          R7      pV# RV 9   d   \        V R,          R7      pV# RV 9   d   \        V R,          R7      pV# \        R4      h)Úservice_error_codeÚhttp_status_code)Ústatus_codeÚ
error_code)rE   Ú	crc32body)ÚheaderzUnknown retry policy)ÚServiceErrorCodeCheckerÚHTTPStatusCodeCheckerÚCRC32Checkerr   )r=   r   s   & r   r@   r@   �   s   € Ø˜xÔ'Ü)Ø Ð!3Õ4ØÐ 4Õ5ô
ˆð €Nð 
˜xÔ	'Ü'Ø Ð!3Õ4ô
ˆð €Nð 
˜Ô	 Ü h¨{Õ&;Ô<ˆð €Nô Ð/Ó0Ð0r   c                 óÂ   € V R ,          pRVP                  R/ 4      9   d   \        .# RV9   d1   . pVR,           F  pVP                  \        V,          4       K!  	  V# R# )r>   rG   r=   r?   N)r-   r   r1   ÚEXCEPTION_MAP)r!   r>   Ú
exceptionsÚnames   &   r   r0   r0   ¢   sf   € Ø˜.Õ)€LØ�l×&Ñ& z°2Ó6Ô6ÜˆÐØ	˜LÔ	(Øˆ
Ø  ×1Ð1ˆDØ×Ñœm¨DÕ1Ö2ñ 2àÐñ	 
)r   c                   ó0   a € ] tR t^­t o RtR tR tRtV tR# )r    a�  Retry handler.

The retry handler takes two params, ``checker`` object
and an ``action`` object.

The ``checker`` object must be a callable object and based on a response
and an attempt number, determines whether or not sufficient criteria for
a retry has been met.  If this is the case then the ``action`` object
(which also is a callable) determines what needs to happen in the event
of a retry.

c                ó   € Wn         W n        R # ©N)Ú_checkerÚ_action)Úselfr   r   s   &&&r   Ú__init__ÚRetryHandler.__init__»   s   € ØŒØŽr   c                óh  € RVRVRV/p\        V P                  \        4      '       d3   VR,          R,          P                  R4      pVP	                  RV/4       V P                  ! R/ VB '       d+   V P                  VR7      p\        P                  R	V4       V# \        P                  R
4       R# )zƒHandler for a retry.

Intended to be hooked up to an event handler (hence the **kwargs),
this will process retries appropriately.

Úattempt_numberr=   Úcaught_exceptionÚrequest_dictÚcontextÚretriesÚretries_context)r   zRetry needed, action of: %szNo retry needed.N© )Ú
isinstancerS   r3   r-   ÚupdaterT   ÚloggerÚdebug)rU   r   r=   rZ   ÚkwargsÚchecker_kwargsr^   Úresults   &&&&,   r   Ú__call__ÚRetryHandler.__call__¿   s    € ð ˜hØ˜ØÐ 0ð
ˆô
 �d—m‘mÔ%9×:Ò:Ø$ ^Õ4°YÕ?×CÑCÀIÓNˆOØ×!Ñ!Ð#4°oÐ"FÔGà�=Š=Ñ*˜>×*Ð*Ø—\‘\¨8�\Ó4ˆFÜ�L‰LÐ6¸Ô?ØˆMÜ�‰Ð'Ö(r   )rT   rS   N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rV   rg   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r    r    ­   s   ø‡ € ñò÷)ð )r   r    c                   ó6   a € ] tR t^Öt o RtR tR tR tRtV t	R# )ÚBaseCheckerz”Base class for retry checkers.

Each class is responsible for checking a single criteria that determines
whether or not a retry should not happen.

c                ól   € Ve   V P                  W4      # Ve   V P                  W4      # \        R4      h)ad  Determine if retry criteria matches.

Note that either ``response`` is not None and ``caught_exception`` is
None or ``response`` is None and ``caught_exception`` is not None.

:type attempt_number: int
:param attempt_number: The total number of times we've attempted
    to send the request.

:param response: The HTTP response (if one was received).

:type caught_exception: Exception
:param caught_exception: Any exception that was caught while trying to
    send the HTTP response.

:return: True, if the retry criteria matches (and therefore a retry
    should occur.  False if the criteria does not match.

z,Both response and caught_exception are None.)Ú_check_responseÚ_check_caught_exceptionr   )rU   rY   r=   rZ   s   &&&&r   rg   ÚBaseChecker.__call__Þ   sE   € ð, ÒØ×'Ñ'¨ÓAÐAØÒ)Ø×/Ñ/Øóð ô ÐKÓLÐLr   c                ó   € R # rR   r_   ©rU   rY   r=   s   &&&r   ru   ÚBaseChecker._check_responseý   ó   € Ùr   c                ó   € R # rR   r_   ©rU   rY   rZ   s   &&&r   rv   Ú#BaseChecker._check_caught_exception   r{   r   r_   N)
ri   rj   rk   rl   rm   rg   ru   rv   rn   ro   rp   s   @r   rs   rs   Ö   s   ø‡ € ñòMò>÷ð r   rs   c                   ó:   a € ] tR tRt o RtRR ltR tR tRtV t	R# )	r3   i  a{  Allow retries up to a maximum number of attempts.

This will pass through calls to the decorated retry checker, provided
that the number of attempts does not exceed max_attempts.  It will
also catch any retryable_exceptions passed in.  Once max_attempts has
been exceeded, then False will be returned or the retryable_exceptions
that was previously being caught will be raised.

Nc                ó*   € Wn         W n        W0n        R # rR   ©rS   Ú_max_attemptsÚ_retryable_exceptions)rU   r   r+   r,   s   &&&&r   rV   ÚMaxAttemptsDecorator.__init__  s   € ØŒØ)ÔØ%9Ö"r   c                ó:  € V'       d*   \        VP                  R ^ 4      V P                  4      VR &   V P                  WV4      pV'       dP   WP                  8¼  d>   Ve"   RV^,          9   d   RV^,          R,          R&   \        P                  RV4       R# V# R# )ÚmaxÚResponseMetadataTÚMaxAttemptsReachedz0Reached the maximum number of retry attempts: %sF)r†   r-   r‚   Ú_should_retryrb   rc   )rU   rY   r=   rZ   r^   Úshould_retrys   &&&&& r   rg   ÚMaxAttemptsDecorator.__call__  s£   € ÷ Ü%(Ø×#Ñ# E¨1Ó-¨t×/AÑ/Aó&ˆO˜EÑ"ð ×)Ñ)ØÐ&6ó
ˆ÷ Ø×!3Ñ!3Ô3àÒ'Ð,>À(È1Å+Ô,Màð ˜Q•KÐ 2Õ3Ð4HÑIô —‘ØFØ"ôñ à#Ð#ár   c                óþ   € V P                   '       d$   WP                  8  d    V P                  WV4      # V P                  WV4      #   T P                    d$   p\        P	                  R TRR7        Rp?R# Rp?ii ; i)z,retry needed, retryable exception caught: %sT)Úexc_infoN)rƒ   r‚   rS   rb   rc   )rU   rY   r=   rZ   Úes   &&&& r   r‰   Ú"MaxAttemptsDecorator._should_retry0  s€   € Ø×%×%Ð%¨.×;MÑ;MÔ*Mð
Ø—}‘}Ø"Ð.>óð ð —=‘= Ð;KÓLÐLøð ×-Ñ-ô Ü—‘ØBØØ!ð ô õ
 ûðús   ¤A ÁA<ÁA7Á7A<r�   rR   )
ri   rj   rk   rl   rm   rV   rg   r‰   rn   ro   rp   s   @r   r3   r3     s    ø‡ € ñô:ò
÷8Mð Mr   r3   c                   ó,   a € ] tR tRt o R tR tRtV tR# )rJ   iC  c                ó   € Wn         R # rR   ©Ú_status_code)rU   rE   s   &&r   rV   ÚHTTPStatusCodeChecker.__init__D  s   € Ø'Ör   c                óŽ   € V^ ,          P                   V P                  8X  d#   \        P                  RV P                  4       R# R# )r   z5retry needed: retryable HTTP status code received: %sTF)rE   r“   rb   rc   ry   s   &&&r   ru   Ú%HTTPStatusCodeChecker._check_responseG  s:   € Ø�A�;×"Ñ" d×&7Ñ&7Ô7Ü�L‰LØGØ×!Ñ!ôñ ár   r’   N©ri   rj   rk   rl   rV   ru   rn   ro   rp   s   @r   rJ   rJ   C  s   ø‡ € ò(÷ð r   rJ   c                   ó,   a € ] tR tRt o R tR tRtV tR# )rI   iR  c                ó   € Wn         W n        R # rR   )r“   Ú_error_code)rU   rE   rF   s   &&&r   rV   Ú ServiceErrorCodeChecker.__init__S  s   € Ø'ÔØ%Ör   c                ó  € V^ ,          P                   V P                  8X  df   V^,          P                  R/ 4      P                  R4      pW0P                  8X  d.   \        P                  RV P                  V P                  4       R# R# )r   ÚErrorÚCodez>retry needed: matching HTTP status and error code seen: %s, %sTF)rE   r“   r-   rš   rb   rc   )rU   rY   r=   Úactual_error_codes   &&& r   ru   Ú'ServiceErrorCodeChecker._check_responseW  sq   € Ø�A�;×"Ñ" d×&7Ñ&7Ô7Ø (¨¥§¡°¸Ó <× @Ñ @ÀÓ HÐØ ×$4Ñ$4Ô4Ü—‘ðà×%Ñ%Ø×$Ñ$ô	ñ Ùr   )rš   r“   Nr—   rp   s   @r   rI   rI   R  s   ø‡ € ò&÷ð r   rI   c                   ó,   a € ] tR tRt o R tR tRtV tR# )r4   ie  c                ó   € Wn         R # rR   ©Ú	_checkers)rU   r6   s   &&r   rV   ÚMultiChecker.__init__f  s   € Ø!Žr   c                óV   € V P                    F  pV! WV4      pV'       g   K  Vu # 	  R # )Fr£   )rU   rY   r=   rZ   r   Úchecker_responses   &&&&  r   rg   ÚMultiChecker.__call__i  s4   € Ø—~”~ˆGÙ&ØÐ*:ó Ð÷  ÑØ'Ò'ñ &ñ r   r£   N)ri   rj   rk   rl   rV   rg   rn   ro   rp   s   @r   r4   r4   e  s   ø‡ € ò"÷ð r   r4   c                   ó,   a € ] tR tRt o R tR tRtV tR# )rK   is  c                ó   € Wn         R # rR   ©Ú_header_name)rU   rH   s   &&r   rV   ÚCRC32Checker.__init__t  s   € à"Ör   c                ó‚  € V^ ,          pVP                   P                  V P                  4      pVf#   \        P	                  RV P                  4       R# \        V^ ,          P                  4      R,          pV\        V4      8X  g8   \        P	                  R\        V4      V4       \        R\        V4      VR7      hR# )r   Nz?crc32 check skipped, the %s header is not in the http response.l   ÿÿ z>retry needed: crc32 check failed, expected != actual: %s != %sr   )Úchecksum_typeÚexpected_checksumÚactual_checksum)	Úheadersr-   r¬   rb   rc   r   ÚcontentÚintr   )rU   rY   r=   Úhttp_responseÚexpected_crcÚactual_crc32s   &&&   r   ru   ÚCRC32Checker._check_responsex  s­   € Ø  �ˆØ$×,Ñ,×0Ñ0°×1BÑ1BÓCˆØÒÜ�L‰Lð(à×!Ñ!öô ! ¨!¥×!4Ñ!4Ó5¸
ÕBˆLØ¤3 |Ó#4Ô4Ü—‘ðä˜Ó%Ø ô	ô $Ø")Ü&)¨,Ó&7Ø$0ôð ñ 5r   r«   Nr—   rp   s   @r   rK   rK   s  s   ø‡ € ò#÷ð r   rK   c                   ó*   a € ] tR tRt o RtR tRtV tR# )rA   i‘  zXRaise any caught exceptions.

This class will raise any non None ``caught_exception``.

c                ó   € VhrR   r_   r}   s   &&&r   rv   Ú'ExceptionRaiser._check_caught_exception˜  s
   € ð Ðr   r_   N)ri   rj   rk   rl   rm   rv   rn   ro   rp   s   @r   rA   rA   ‘  s   ø‡ € ñ÷ð r   rA   rR   )r   Úloggingr   Úbinasciir   Úbotocore.exceptionsr   r   r   r   r   Ú	getLoggerri   rb   rM   r   r   r"   r   r   r/   r@   r0   r    rs   r3   rJ   rI   r4   rK   rA   r_   r   r   Ú<module>rÀ      sÖ   ðó Û Û Ý ÷õ ð 
×	Ò	˜8Ó	$€ð ØØØØð	!ð€òò.	ô8ô

ô
òD!òò$÷&)ñ &)÷R+ñ +ô\<M˜;ô <Mô~˜Kô ô˜kô ô&�;ô ô�;ô ô<�kö r   