403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.55
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.7
System : Linux ip-172-31-69-123.ec2.internal 6.1.177-224.371.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 20:28:29 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/awscli/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/awscli/botocore/__pycache__/context.cpython-39.pyc
a

wA�i��@s�dZddlmZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
eGdd	�d	��Zed
�Zdd�Zd
d�Zdd�Zeddd��Zddd�ZdS)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��wraps)�Setc@s(eZdZUdZeed�Zeee	d<dS)�
ClientContexta

    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_factory�featuresN)
�__name__�
__module__�__qualname__�__doc__r�setrr	�str�__annotations__�rr�;/usr/lib/python3.9/site-packages/awscli/botocore/context.pyr
s
r
�_contextcCs
t�d�S)z@Get the current ``_context`` context variable if set, else None.N)r�getrrrr�get_context*srcCst�|�}|S)a2Set 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.
    )rr)�ctx�tokenrrr�set_context/s

rcCst�|�dS)z�Reset the current ``_context`` context variable.

    :type token: contextvars.Token
    :param token: Token object to reset the context variable.
    N)r�reset)rrrr�
reset_context=srNccsL|pt�}|durt�}nt|�}t|�}zdVWt|�n
t|�0dS)a�
    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)rr
rrr)r�current�newrrrr�start_as_current_contextFs
r cs�fdd�}|S)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.
    cst����fdd��}|S)NcsBt��(�r���|i|��Wd�S1s40YdS)N)r )�args�kwargs)�func�hookrr�wrapperwsz8with_current_context.<locals>.decorator.<locals>.wrapperr)r#r%�r$)r#r�	decoratorvsz'with_current_context.<locals>.decoratorr)r$r'rr&r�with_current_contextes
r()N)N)r�
contextlibrZcontextvarsr�copyrZdataclassesrr�	functoolsr�typingr	r
rrrrr r(rrrr�<module>
s	

Youez - 2016 - github.com/yon3zu
LinuXploit