o
    i	                     @   s   d Z ddlZddlZddlZddlmZ ddlmZ ddlm	Z	 e
eZeG dd dZedZd	d
 Zdd Zdd Zdd Zdd ZdS )z
NOTE: This module is considered private and is subject to abrupt breaking
changes without prior announcement. Please do not use it directly.
    N)
ContextVar)	dataclass)Optionalc                   @   s"   e Zd ZU dZdZee ed< dS )PluginContextzY
    Encapsulation of plugins tracked within the `_plugin_context` context variable.
    Nplugins)__name__
__module____qualname____doc__r   r   str__annotations__ r   r   U/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/botocore/plugin.pyr      s   
 r   _plugin_contextc                   C   s
   t dS )zEGet the current `_plugin_context` context variable if set, else None.N)r   getr   r   r   r   get_plugin_context(   s   
r   c                 C   s   t | }|S )z3Set the current `_plugin_context` context variable.)r   set)ctxtokenr   r   r   set_plugin_context-   s   
r   c                 C   s   t |  dS )z5Reset the current `_plugin_context` context variable.N)r   reset)r   r   r   r   reset_plugin_context3   s   r   c                  C   s<   t  } | d ur| j}|d u rtjd| _n|S tjdS )NBOTOCORE_EXPERIMENTAL__PLUGINS)r   r   osenvironr   )contextr   r   r   r   get_botocore_plugins8   s   r   c                 C   s   |  D ]>\}}td|| zt|}||  W q ty*   td| Y q tyB } ztd|| W Y d }~qd }~ww d S )Nz)Importing client plugin %s from module %sz1Failed to locate the following plugin module: %s.z)Error raised during the loading of %s: %s)itemslogdebug	importlibimport_moduleinitialize_client_pluginModuleNotFoundError	Exception)clientr   plugin_namemodule_namemoduleer   r   r   load_client_pluginsC   s*   
r*   )r
   r    loggingr   contextvarsr   dataclassesr   typingr   	getLoggerr   r   r   r   r   r   r   r   r*   r   r   r   r   <module>   s    
