+
    šÜiÆ  ã                   ó¨   € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht ] ! R R4      4       t]! R4      tR	 tR
 tR t]RR l4       tRR ltR# )z”
NOTE: All classes and functions in this module are considered private and are
subject to abrupt breaking changes. Please do not use them directly.
)Úcontextmanager)Ú
ContextVar)Údeepcopy)Ú	dataclassÚfield©Úwrapsc                   óB   a € ] tR t^t o Rt]! ]R7      tV 3R ltRt	V t
R# )ÚClientContextzö
Encapsulation of objects tracked within the ``_context`` context variable.

``features`` is a set responsible for storing features used during
preparation of an AWS request. ``botocore.useragent.register_feature_id``
is used to add to this set.
)Údefault_factoryc                ó6   <€ V ^8„  d   Qh/ S[ S[,          ;R&   # )é   Úfeatures)ÚsetÚstr)ÚformatÚ__classdict__s   "€Ú2/usr/lib/python3/dist-packages/botocore/context.pyÚ__annotate__ÚClientContext.__annotate__   s   ø‡ ‚ ñ ‘#�hÑ3ò ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r
   r
      s   ø‡ € ññ ¨sÔ3€H÷ ƒ r   r
   Ú_contextc                 ó,   € \         P                  R4      # )z@Get the current ``_context`` context variable if set, else None.N)r    Úgetr   r   r   Úget_contextr#   )   s   € ä�<‰<˜ÓÐr   c                ó0   € \         P                  V 4      pV# )a  Set the current ``_context`` context variable.

:type ctx: ClientContext
:param ctx: Client context object to set as the current context variable.

:rtype: contextvars.Token
:returns: Token object used to revert the context variable to what it was
    before the corresponding set.
)r    r   )ÚctxÚtokens   & r   Úset_contextr'   .   s   € ô �L‰L˜Ó€EØ€Lr   c                ó0   € \         P                  V 4       R# )z‹Reset the current ``_context`` context variable.

:type token: contextvars.Token
:param token: Token object to reset the context variable.
N)r    Úreset)r&   s   &r   Úreset_contextr*   <   s   € ô ‡N�N�5Ör   Nc              #  óÀ   "  € T ;'       g    \        4       pVf   \        4       pM\        V4      p\        V4      p Rx € \	        V4       R#   \	        T4       i ; i5i)aO  
Context manager that copies the passed or current context object and sets
it as the current context variable. If no context is found, a new
``ClientContext`` object is created. It mainly ensures the context variable
is reset to the previous value once the executed code returns.

Example usage:

    def my_feature():
        with start_as_current_context():
            register_feature_id('MY_FEATURE')
            pass

:type ctx: ClientContext
:param ctx: The client context object to set as the new context variable.
    If not provided, the current or a new context variable is used.
N)r#   r
   r   r'   r*   )r%   ÚcurrentÚnewr&   s   &   r   Ústart_as_current_contextr.   E   sN   é € ð& ×"Ð"”[“]€GØ‚Ü‹o‰ä�wÓˆÜ˜Ó€EðÛä�eÖøŒ�eÕüs   ‚:A½A ÁAÁAÁAc                ó   a € V 3R lpV# )aÏ  
Decorator that wraps ``start_as_current_context`` and optionally invokes a
hook within the newly-set context. This is just syntactic sugar to avoid
indenting existing code under the context manager.

Example usage:

    @with_current_context(partial(register_feature_id, 'MY_FEATURE'))
    def my_feature():
        pass

:type hook: callable
:param hook: A callable that will be invoked within the scope of the
    ``start_as_current_context`` context manager.
c                 ó4   <a € \        S 4      V V3R  l4       pV# )c                  ó”   <€ \        4       ;_uu_ 4        S'       d   S! 4        S! V / VB uuR R R 4       #   + '       g   i     R # ; i©N)r.   )ÚargsÚkwargsÚfuncÚhooks   *,€€r   ÚwrapperÚ8with_current_context.<locals>.decorator.<locals>.wrapperv   s0   ø€ ä)×+Õ+ßÙ”FÙ˜TÐ, VÑ,÷ ,×+×+Ó+ús	   ”6¶A	r   )r5   r7   r6   s   f €r   Ú	decoratorÚ'with_current_context.<locals>.decoratoru   s    ù€ Ü	ˆt‹õ	-ó 
ð	-ð ˆr   r   )r6   r9   s   f r   Úwith_current_contextr;   d   s   ø€ õ"ð Ðr   r2   )r   Ú
contextlibr   Úcontextvarsr   Úcopyr   Údataclassesr   r   Ú	functoolsr   r
   r    r#   r'   r*   r.   r;   r   r   r   Ú<module>rA      sh   ðñõ
 &Ý "Ý ß (Ý ð ÷	4ð 	4ó ð	4ñ �jÓ!€òò
òð óó ðö<r   