
    fi	                         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dS  d
             ZdS )    N)TYPE_CHECKING)AnyContextManagerOptionalc                   $    e Zd ZdZd Zd Zd ZdS )
_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                     || _         d S N)_client)selfclients     o/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/sentry_sdk/_init_implementation.py__init__z_InitGuard.__init__   s        c                 H    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        }||                                 d S d S r   )r   r   r   r   r   close)r   exc_type	exc_valuetbcs        r   __exit__z_InitGuard.__exit__#   sM    ='	
 	
 	
 	
 L=GGIIIII =r   N)__name__
__module____qualname__r   r   r   r!    r   r   r   r      sL        	J 1    
 
 
 
 
r   r   c                      d S r
   r%   r%   r   r   _check_python_deprecationsr'   0   s	    
 	Dr   c                      t          j        | i |}t          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   sT     ///F!!,,V444   	F		BIr   c                       e Zd ZdS )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      s                     4444444444               F	 	 	
 
 
      z 2J      MMDDDr   