o
    h	                     @   s   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 dZdd Z	dd	 Z
er<G d
d dejjeZdS dd  ZdS )    N)TYPE_CHECKING)AnyContextManagerOptionalc                   @   s(   e Zd ZdZdd Zdd Zd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                 C   s
   || _ d S N)_client)selfclient r   a/var/www/html/pro-man-master/venv/lib/python3.10/site-packages/sentry_sdk/_init_implementation.py__init__   s   
z_InitGuard.__init__c                 C   s   t j| jdtd | S N   )
stacklevelcategory)warningswarn,_CONTEXT_MANAGER_DEPRECATION_WARNING_MESSAGEDeprecationWarning)r	   r   r   r   	__enter__   s   z_InitGuard.__enter__c                 C   s0   t j| jdtd | j}|d ur|  d S d S r   )r   r   r   r   r   close)r	   exc_type	exc_valuetbcr   r   r   __exit__#   s   z_InitGuard.__exit__N)__name__
__module____qualname__r   r   r   r   r   r   r   r   r      s    
r   c                   C   s   d S r   r   r   r   r   r   _check_python_deprecations0   s   r    c                  O   s0   t j| i |}t  | 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
   rvr   r   r   _init8   s
   r(   c                   @   s   e Zd ZdS )initN)r   r   r   r   r   r   r   r)   L   s    r)   c                   C   s   t S r   )r(   r   r   r   r   <lambda>T   s    r*   )r   typingr   r!   r   r   r   sentry_sdk.constsr   r    r(   constsClientConstructorr)   r   r   r   r   <module>   s    #