
    i	                         d Z ddlZddlZddlZddlmZ ddlmZ  ej        e	          Z
e G d d                      Z ed          Zd Zd	 Zd
 Zd Z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)	dataclassc                   (    e Zd ZU dZdZedz  ed<   dS )PluginContextzY
    Encapsulation of plugins tracked within the `_plugin_context` context variable.
    Nplugins)__name__
__module____qualname____doc__r   str__annotations__     V/home/piyush/.hermes/hermes-agent/venv/lib/python3.11/site-packages/botocore/plugin.pyr   r      s2           GS4Zr   r   _plugin_contextc                  6    t                               d          S )zEGet the current `_plugin_context` context variable if set, else None.N)r   getr   r   r   get_plugin_contextr   '   s    t$$$r   c                 :    t                               |           }|S )z3Set the current `_plugin_context` context variable.)r   set)ctxtokens     r   set_plugin_contextr   ,   s    $$ELr   c                 :    t                               |            dS )z5Reset the current `_plugin_context` context variable.N)r   reset)r   s    r   reset_plugin_contextr   2   s    %     r   c                      t                      } | 0| j        }|%t          j                            d          | _        n|S t          j                            d          S )NBOTOCORE_EXPERIMENTAL__PLUGINS)r   r   osenvironr   )contextr   s     r   get_botocore_pluginsr"   7   sQ     ""G/? jnn-MNNGOON:>>:;;;r   c                 x   |                                 D ]\  }}t                              d||           	 t          j        |          }|                    |            L# t          $ r t                              d|           Y st          $ r&}t                              d||           Y d }~d }~ww xY 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es         r   load_client_pluginsr1   B   s   $+MMOO   [		7	
 	
 	

	,[99F++F3333" 	 	 	IIC      	 	 	II;[!       	 s   )A!!%B7	B7B22B7)r   r'   loggingr   contextvarsr   dataclassesr   	getLoggerr   r%   r   r   r   r   r   r"   r1   r   r   r   <module>r6      s    
      				 " " " " " " ! ! ! ! ! !g!!         *.//% % %
  ! ! !
< < <    r   