o
    è’OjÇ	  ã                   @   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 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)Ú	dataclassc                   @   s"   e Zd ZU dZdZedB ed< dS )ÚPluginContextzY
    Encapsulation of plugins tracked within the `_plugin_context` context variable.
    NÚplugins)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚ__annotations__© r   r   úU/var/www/html/pharmsmart-cdr-gen/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_context2   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_plugins7   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_pluginsB   s*   ý
þÿ€ÿòr)   )r	   r   Úloggingr   Úcontextvarsr   Údataclassesr   Ú	getLoggerr   r   r   r   r   r   r   r   r)   r   r   r   r   Ú<module>   s   
