Viewing File: /opt/hc_python/lib/python3.12/site-packages/sentry_sdk/__pycache__/_compat.cpython-312.pyc

�

_�*j���ddlZddlmZerddlmZmZed�Zejddk(xrejddk\Zejddk(xrejddk\Zejddk(xrejdd	k\Z	ejddk(xrejdd
k\Z
dd�Zdefd
�Z
y)�N)�
TYPE_CHECKING)�Any�TypeVar�T�����
��returnc�Z���G��fd�dt�}tj|ddi�S)Nc���eZdZd��fd�Zy)�!with_metaclass.<locals>.MetaClassc����|�|�S)N�)�metacls�name�
this_bases�d�bases�metas    ���A/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/_compat.py�__new__z)with_metaclass.<locals>.MetaClass.__new__s�����e�Q�'�'�N)
rrrrrrrrr
r)�__name__�
__module__�__qualname__r)rrs��r�	MetaClassrs���	(rr�temporary_classr)�typer)rrrs`` r�with_metaclassr"s'���(�D�(��<�<�	�#4�b�"�=�=rc�*���	ddlm�ddlm�dt
dtf��fd�}d�vxs|d	�}|d
�}|d�xs|d�}|r|sdd
lm}|td��y|s|r|sdd
lm}|td��yy#t$rYywxYw)Nr)�optT)�FALSE_VALUES�optionr
c�����j|d�}t|t�r|St|t�r	|j	�}|xrt
|�j��vS#t
$rY�*wxYw)NF)�get�
isinstance�bool�bytes�decode�	Exception�str�lower)r&�valuer%r$s  ��r�enabledz+check_uwsgi_thread_support.<locals>.enabled,so��������&���e�T�"��L��e�U�#�
�������?��U��)�)�+�<�?�?���
��
�s�A&�&	A2�1A2�threadszenable-threadszpy-call-uwsgi-fork-hooksz	lazy-apps�lazy)�warnz�IMPORTANT: We detected the use of uWSGI without thread support. This might lead to unexpected issues. Please run uWSGI with "--enable-threads" for full support.Fz�IMPORTANT: We detected the use of uWSGI in preforking mode without thread support. This might lead to crashing workers. Please run uWSGI with both "--enable-threads" and "--py-call-uwsgi-fork-hooks" for full support.)
�uwsgir$�ImportError�sentry_sdk.constsr%r.r*�warningsr4�Warning)r1�threads_enabled�
fork_hooks_on�	lazy_moder4r%r$s     @@r�check_uwsgi_thread_supportr=s������/�@��@��@� �3�&�C�'�2B�*C�O��6�7�M���$�7����I���!���M�
�	
��
��}�!���A�
�	
����k����s�B�	B�B)rrrrr
r)�sys�typingrrrr�version_info�PY37�PY38�PY310�PY311r"r*r=rrr�<module>rEs���
� ��#����A������a��<�C�$4�$4�Q�$7�1�$<��
�����a��<�C�$4�$4�Q�$7�1�$<�������q� �>�S�%5�%5�a�%8�B�%>�������q� �>�S�%5�%5�a�%8�B�%>��>�D�D�Dr
Back to Directory File Manager