
    tni	                         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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)	dataclass)Optionalc                   .    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__     L/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/botocore/plugin.pyr   r      s2           "GXc]!!!!!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   3   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#   8   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_pluginsr2   C   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   typingr   	getLoggerr	   r&   r   r   r   r   r   r#   r2   r   r   r   <module>r8      s   
      				 " " " " " " ! ! ! ! ! !      g!! " " " " " " " " *.//% % %
  ! ! !
< < <    r   