
    lh	                         d dl Z d dlmZ d dlZerd dlmZmZmZ d dlZ G d d      Zd Z	d Z
er! G d d	ej                  j                  e      Zy d
        Zy)    N)TYPE_CHECKING)AnyContextManagerOptionalc                   "    e Zd ZdZd Zd Zd Zy)
_InitGuardzUsing the return value of sentry_sdk.init as a context manager and manually calling the __enter__ and __exit__ methods on the return value are deprecated. We are no longer maintaining this functionality, and we will remove it in the next major release.c                     || _         y N)_client)selfclients     q/var/www/pru.catia.catastroantioquia-mas.com/tasa/lib/python3.12/site-packages/sentry_sdk/_init_implementation.py__init__z_InitGuard.__init__   s	        c                 R    t        j                  | j                  dt               | S N   )
stacklevelcategory)warningswarn,_CONTEXT_MANAGER_DEPRECATION_WARNING_MESSAGEDeprecationWarning)r   s    r   	__enter__z_InitGuard.__enter__   s$    =='	
 r   c                     t        j                  | j                  dt               | j                  }||j                          y y r   )r   r   r   r   r   close)r   exc_type	exc_valuetbcs        r   __exit__z_InitGuard.__exit__#   s;    =='	
 LL=GGI r   N)__name__
__module____qualname__r   r   r   r!    r   r   r   r      s    	J 1
r   r   c                       y r
   r%   r%   r   r   _check_python_deprecationsr'   0   s    
 	r   c                      t        j                  | i |}t        j                         j                  |       t	                t        |      }|S )zsInitializes the SDK and optionally integrations.

    This takes the same arguments as the client constructor.
    )
sentry_sdkClientget_global_scope
set_clientr'   r   )argskwargsr   rvs       r   _initr0   8   sE     //F!,,V4 	F	BIr   c                       e Zd Zy)initN)r"   r#   r$   r%   r   r   r2   r2   L   s    r   r2   c                      t         S r
   )r0   r%   r   r   <lambda>r4   T   s    E r   )r   typingr   r)   r   r   r   sentry_sdk.constsr   r'   r0   constsClientConstructorr2   r%   r   r   <module>r9      sX       44   F	
 z  22J  Dr   