Your IP : 3.144.104.118


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/warnings.cpython-312.opt-1.pyc

�

�Q�f�U��8�dZddlZgd�Zd0d�Zd1d�Zd�Zd�ZeZd�ZeZ	d	�Z
d
ed
ddfd�Zeddfd
�Z
d�Zd�ZGd�de�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd2dd�d�Z		d3d�ZGd�d e�ZGd!�d"e�Zd#Zefej@d$�d%�Z!d&�Z"	dd'l#m$Z$m%Z%m&Z&mZmZm'Z'e%Z(e&Z)d(Z*eejZ�e*sAe.ed+�s8ed)e/d,d�-�e
d.e/d�/�e
d.e0d�/�e
d.e1d�/�e
d.e2d�/�[*y#e+$rgZ$d)Z(iZ)da,d*�Z'dZ*Y�kwxYw)4z&Python part of the warnings subsystem.�N)�warn�
warn_explicit�showwarning�
formatwarning�filterwarnings�simplefilter�
resetwarnings�catch_warningsc�:�t||||||�}t|�y)�7Hook to write a warning to a file; replace if you like.N)�WarningMessage�_showwarnmsg_impl)�message�category�filename�lineno�file�line�msgs       �//opt/alt/python312/lib64/python3.12/warnings.pyrr
s��
��(�H�f�d�D�
I�C��c��c�8�t||||d|�}t|�S)�.Function to format a warning the standard way.N)r
�_formatwarnmsg_impl)rrrrrrs      rrrs!��
��(�H�f�d�D�
I�C��s�#�#rc��|j}|�tj}|�yt|�}	|j	|�y#t
$rYywxYw�N)r�sys�stderr�_formatwarnmsg�write�OSError)rr�texts   rrrsP���8�8�D��|��z�z���<�
��#��D�
��
�
�4����
��
�s�A�	A�Ac�v�|jj}|j�d|j�d|�d|j�d�}|j
�;|jdk7r,	ddl}|j|j|j�}n|j
}|r|j�}|d|zz
}|j��	ddl}	|j�}|j|j�}|�u|dz
}|D]i}|d	|j�d
|j�d�z
}	�'|j|j|j�}nd}|s�R|j�}|d|zz
}�k|S|r||�d�z
}|S#t$rd}d}Y��wxYw#t$rd}d}Y��wxYw#t$rd}d}Y��wxYw#t$rd}Y�qwxYw)
N�:z: �
rrz  %s
Fz-Object allocated at (most recent call last):
z  File "z
", lineno z    %s
z<: Enable tracemalloc to get the object allocation traceback
)r�__name__rrrr�	linecache�getline�	Exception�strip�source�tracemalloc�
is_tracing�get_object_traceback)	rr�sr'rr,�suggest_tracemalloc�tb�frames	         rrr#s����|�|�$�$�H��L�L�>��3�:�:�,�b��
�"�S�[�[�M��	D�A��x�x��C�L�L�E�1�	���$�$�S�\�\�3�:�:�>�D��x�x����z�z�|��	�X��_���
�z�z��	��
�*5�*@�*@�*B�&B�#� �5�5�c�j�j�A���>�
�A�A�A����������7�8�� � �,�(�0�0�������N��#����:�:�<�D���d�*�*�A��"
�H�!�
�X�J�+�,�
-�A��H��c�	��D��I�		��0�
�',�#���	
���	�"'���B�	��2!� ��D� �sH�*E1�=F�,F�+F*�1
F�F�
F�F�
F'�&F'�*F8�7F8c��	t}|tur`t|�std��||j|j
|j|j|j|j�yt|�y#t$rY�wxYw)rz:warnings.showwarning() must be set to a function or methodN)r�_showwarning_orig�callable�	TypeErrorrrrrrr�	NameErrorr)r�sws  r�_showwarnmsgr9cs~��
�
���&�&��B�<��!5�6�6�
�s�{�{�C�L�L�#�,�,��
�
��x�x����
#���c����
��
�s�A<�<	B�Bc���	t}|tur>||j|j|j|j
|j�St|�S#t$r
Yt|�SwxYw)r)	r�_formatwarning_origrrrrrr7r)r�fws  rrrxso��:�
���(�(��c�k�k�3�<�<��l�l�C�J�J����:�
:��s�#�#���
���s�#�#�
�s�A�	A/�.A/�Fc��|s|rddl}|rj||j�}nd}|rj|�}nd}t||||||��y)a�Insert an entry into the list of warnings filters (at the front).

    'action' -- one of "error", "ignore", "always", "default", "module",
                or "once"
    'message' -- a regex that the warning message must match
    'category' -- a class that the warning must be a subclass of
    'module' -- a regex that the module name must match
    'lineno' -- an integer line number, 0 matches all warnings
    'append' -- if true, append to the list of filters
    rN��append)�re�compile�I�_add_filter)�actionrr�modulerr@rAs       rrr�sP��*�&����*�*�W�b�d�d�+����
����F�#��������6�6�&�Irc�&�t|d|d||��y)a�Insert a simple entry into the list of warnings filters (at the front).

    A simple filter matches all modules and messages.
    'action' -- one of "error", "ignore", "always", "default", "module",
                or "once"
    'category' -- a class that the warning must be a subclass of
    'lineno' -- an integer line number, 0 matches all warnings
    'append' -- if true, append to the list of filters
    Nr?)rD)rErrr@s    rrr�s�����h��f�V�Drc���|s7	tj|�tjd|�t�y|tvrtj|�t�y#t$rY�TwxYw)Nr)�filters�remove�
ValueError�insertr@�_filters_mutated)r@�items  rrDrD�s`���	��N�N�4� �	���q�$�����w���N�N�4� ����
�	��	�s�A"�"	A.�-A.c�*�gtddt�y)zAClear the list of warning filters, so that no filters are active.N)rIrM�rrr	r	�s���G�A�J��rc��eZdZdZy)�_OptionErrorz,Exception used by option processing helpers.N)r&�
__module__�__qualname__�__doc__rPrrrRrR�s��6�rrRc��|D]}	t|��y#t$r&}td|tj��Yd}~�<d}~wwxYw)NzInvalid -W option ignored:)r)�
_setoptionrR�printrr)�args�argrs   r�_processoptionsr[�sA����	F��s�O����	F��.��#�*�*�E�E��	F�s��	A�?�Ac�4�|jd�}t|�dkDrtd|����t|�dkr |jd�t|�dkr� |D�cgc]}|j	���c}\}}}}}t|�}t
|�}|s|rddl}|rj|�}|rj|�dz}|r	t|�}|dkrt�nd}t|||||�ycc}w#ttf$rtd|���d�wxYw)Nr$�ztoo many fields (max 5): r=rz\Zzinvalid lineno )
�split�lenrRr@r*�
_getaction�_getcategoryrA�escape�intrK�
OverflowErrorr)	rZ�partsr/rErrrFrrAs	         rrWrW�s+���I�I�c�N�E�
�5�z�A�~��C�A�B�B�

�e�*�q�.�
���R���e�*�q�.�;@�1A�:?�Q�23����:?�1A�-�F�G�X�v�v�
��
�F��H�%�H��&����)�)�G�$��
����6�"�U�*��
�	J���[�F���z� � ��
���6�7�H�f�f�=��'1A���M�*�	J��f�>�?�T�I�	J�s� C3�
C8�8Dc�h�|sy|dk(rydD]}|j|�s�|cStd|����)N�default�all�always)rgri�ignorerF�once�errorzinvalid action: )�
startswithrR)rE�as  rr`r`�s=����
���x�
G���<�<����H�H��v�7�
8�8rc�<�|stSd|vrddl}|}n%|jd�\}}}	t|dd|g�}	t
||�}t|t�std|����|S#t$rtd|���d�wxYw#t$rtd|���d�wxYw)N�.rzinvalid module name: zunknown warning category: zinvalid warning category: )	�Warning�builtins�
rpartition�
__import__�ImportErrorrR�getattr�AttributeError�
issubclass)r�m�klassrF�_�cats      rrara�s������
�(�����#�.�.�s�3����5�	P��6�4���w�7�A�S��a�����c�7�#��X�G�H�H��J���	P��F�D�E�4�O�	P���S��X�G�H�d�R�S�s�A&�B�&A?�Bc��d|vxrd|vS)N�	importlib�
_bootstraprP)rs r�_is_internal_filenamer�s���(�"�?�|�x�'?�?rc�,��t�fd�|D��S)Nc3�@�K�|]}�j|����y�wr)rm)�.0�prefixrs  �r�	<genexpr>z'_is_filename_to_skip.<locals>.<genexpr>s�����L�9K�v�x�"�"�6�*�9K�s�)�any)r�skip_file_prefixess` r�_is_filename_to_skipr�s����L�9K�L�L�Lrc�@�t|jj�S)zFSignal whether the frame is an internal CPython implementation detail.)r��f_code�co_filename)r2s r�_is_internal_framer�s�� ����!9�!9�:�:rc��|j}|�jt|jjx}�st	||�r=|j}|�/t|jjx}�r�0t	||�r�=|S)zBFind the next frame that doesn't involve Python or user internals.)�f_backr�r�r�r�)r2r�rs   r�_next_external_framer� sk���L�L�E�
�
�!�e�l�l�.F�.F�"F�(�G� ��+=�>������
�!�e�l�l�.F�.F�"F�(�G� ��+=�>��Lr�rP)r�c
�&�t|t�r|j}|�t}t|t�rt|t�s-t
djt	|�j���t|t�st
d��|rtd|�}	|dksttjd��rtj|�}n<tjd�}t|dz
�D]}t||�}|��t �|j"}|j$j&}|j(}	d|vr|d}
nd}
|j-d	i�}t/||||	|
|||�y#t $rtj*}d}d}	Y�PwxYw)
z:Issue a warning, or maybe ignore it or raise an exception.Nz/category must be a Warning subclass, not '{:s}'z+skip_file_prefixes must be a tuple of strs.�r�rr&z<string>�__warningregistry__)�
isinstancerq�	__class__�UserWarning�typerxr6�formatr&�tuple�maxr�r�	_getframe�ranger�rK�	f_globalsr�r��f_lineno�__dict__�
setdefaultr)rr�
stacklevelr+r�r2�x�globalsrrrF�registrys            rrr+su���'�7�#��$�$�������x��&�:�h��+H��%�%+�V�D��N�,C�,C�%D�F�	F��(�%�0��E�F�F����J�'�
� ���?�0����q�1A�B��M�M�*�-�E��M�M�!�$�E��:�a�<�(��,�U�4F�G���=�$�$�)��/�/���<�<�+�+�������W����$�����!�!�"7��<�H��'�8�X�v�v�x��6�#�����,�,�������s�A-E0�
E0�0F�Fc�z�t|�}|�!|xsd}|ddj�dk(r|dd}|�i}|jdd�tk7r|j	�t|d<t|t�rt|�}|j}n
|}||�}|||f}	|j|	�rytD]K}
|
\}}}
}}|�|j|�s�t||
�s�,|�|j|�s�@|dk(s||k(s�Knt}|dk(ryddl
}|j||�|dk(r|�|dk(r)d	||	<||f}tj|�ryd	t|<nI|d
k(rnC|dk(r"d	||	<||df}|j|�ryd	||<n|dk(rd	||	<nt!d
|�d
����t#|||||�}t%|�y)Nz	<unknown>���z.py�versionrrjrlrkr�rirFrgzUnrecognized action (z) in warnings.filters:
 )rc�lower�get�_filters_version�clearr�rq�strr�rI�matchrx�
defaultactionr'�getlines�onceregistry�RuntimeErrorr
r9)rrrrrFr��module_globalsr+r"�keyrNrErr|�mod�lnr'�oncekey�altkeys                   rrrYs�����[�F�
�~��(�[���"�#�;����%�'��C�R�[�F������|�|�I�q�!�%5�5�����.�����'�7�#��7�|���$�$�����7�#����6�
"�C��|�|�C�����$(�!���S�#�r�
�[�C�I�I�d�O��x��%�
�[�C�I�I�f�-�
�1�W��"���
���
�����
���x��0�
����
�
������
���"�����G�$�� !��W��	�8�	��	�8�	����
���!�$���<�<��������	�9�	����
���t���	���(�H�f�f�
E�C���rc�"�eZdZdZ		dd�Zd�Zy)r
)rrrrrrr+Nc��||_||_||_||_||_||_||_|r|j|_yd|_yr)	rrrrrrr+r&�_category_name)�selfrrrrrrr+s        r�__init__zWarningMessage.__init__�sJ����� ��
� ��
������	���	����3;�h�/�/�����rc��d|j�d|j�d|j�d|j�d|j�d�S)Nz{message : z
, category : z
, filename : z, lineno : z	, line : �})rr�rrr)r�s r�__str__zWarningMessage.__str__�s0��$(�L�L�$�2E�2E�$(�M�M�4�;�;��	�	�K�	Lr)NNN)r&rSrT�_WARNING_DETAILSr�r�rPrrr
r
�s ��*��BF�#'�	F�Lrr
c�8�eZdZdZdddeddd�d�Zd�Zd�Zd	�Zy)
r
a9A context manager that copies and restores the warnings filter upon
    exiting the context.

    The 'record' argument specifies whether warnings should be captured by a
    custom implementation of warnings.showwarning() and be appended to a list
    returned by the context manager. Otherwise None is returned by the context
    manager. The objects appended to the list are arguments whose attributes
    mirror the arguments to showwarning().

    The 'module' argument is to specify an alternative module to the module
    named 'warnings' and imported under that name. This argument is only useful
    when testing the warnings module itself.

    If the 'action' argument is not None, the remaining arguments are passed
    to warnings.simplefilter() as if it were called immediately on entering the
    context.
    FNr)�recordrFrErrr@c��||_|�tjdn||_d|_|�d|_y||||f|_y)z�Specify whether to record warnings and if an alternative module
        should be used other than sys.modules['warnings'].

        For compatibility with Python 3.0, please consider all arguments to be
        keyword-only.

        N�warningsF)�_recordr�modules�_module�_entered�_filter)r�r�rFrErrr@s       rr�zcatch_warnings.__init__�sD�����28�.�s�{�{�:�.�f�����
��>��D�L�"�H�f�f�=�D�Lrc��g}|jr|jd�|jtjdur|jd|jz�t|�j}|�ddj|��d�S)Nzrecord=Truer�z	module=%r�(z, �))r�r@r�rr�r�r&�join)r�rY�names   r�__repr__zcatch_warnings.__repr__�sf�����<�<��K�K�
�&��<�<�s�{�{�:�6�6��K�K��d�l�l�2�3��D�z�"�"������4��1�1rc�4�|jrtd|z��d|_|jj|_|jdd|j_|jj�|jj|_|jj|_|j�t|j�|jrDg}|j|j_|jj|j_|Sy)NzCannot enter %r twiceT)r�r�r�rI�_filtersrMr�_showwarningrr�rr�r@r4)r��logs  r�	__enter__zcatch_warnings.__enter__�s����=�=��6��=�>�>���
����,�,��
�#�}�}�Q�/��������%�%�'� �L�L�4�4���!%���!?�!?����<�<�#��$�,�,�'��<�<��C�-0�Z�Z�D�L�L�*�(,�|�|�'E�'E�D�L�L�$��J�rc��|jstd|z��|j|j_|jj�|j|j_|j|j_y)Nz%Cannot exit %r without entering first)	r�r�r�r�rIrMr�rr)r��exc_infos  r�__exit__zcatch_warnings.__exit__�s^���}�}��F��M�N�N�#�}�}��������%�%�'�#'�#4�#4���� �)-�)?�)?����&r)	r&rSrTrUrqr�r�r�r�rPrrr
r
�s,���$"'�t��w�q��>�"2��*@rr
z@{name!r} is deprecated and slated for removal in Python {remove})�_versionc��|d�d|d��}|dd|kDs|dd|k(r|ddk7r|�d|�d	�}t|��|j||�
�}t|td��y)a;Warn that *name* is deprecated or should be removed.

    RuntimeError is raised if *remove* specifies a major/minor tuple older than
    the current Python version or the same version but past the alpha.

    The *message* argument is formatted with *name* and *remove* as a Python
    version (e.g. "3.11").

    rrpr�Nr���alphaz% was slated for removal after Python z alpha)r�rJ)r�)r�r�r�DeprecationWarning)r�rrJr��remove_formattedrs      r�_deprecatedr�s���!��)��A�f�Q�i�[�1����!��v��8�B�Q�<�6�#9�h�q�k�W�>T���=�>N�=O�v�V���3����n�n�$�/?�n�@���S�$��3rc�*���d�j�d�g}�j�Addl�ddl}��fd�}|j	d�||jt
|���z
}dj|�jd�}t|td��	�y)
Nzcoroutine 'z' was never awaited
rc3�~�K�t�j�D] \}}}�j||�}||||f���"y�wr)�reversed�	cr_originr()rr�funcnamer�coror's    ��r�extractz*_warn_unawaited_coroutine.<locals>.extractsC�����.6�t�~�~�.F�*��&�(� �(�(��6�:�����4�8�8�/G�s�:=z-Coroutine created at (most recent call last)
r=r%r�)rr�r+)rTr�r'�	tracebackr@�format_list�listr��rstripr�RuntimeWarning)r��	msg_linesr�r�rr's`    @r�_warn_unawaited_coroutiner�s����
�d�'�'�(�(=�>��I��~�~�!�#�	9�	���I�J��Y�*�*�4��	�?�;�;�	�
�'�'�)�
�
#�
#�D�
)�C�	��~�!�D�Ar)rI�_defaultaction�
_onceregistryrrrMTrgc��tdz
ay)Nr�)r�rPrrrMrMCs
���A��r�gettotalrefcount�__main__)rrFr@rj)rr@)NNr)Nr�N)NNNN)3rUr�__all__rrrrr4r9r;rrqrrrDr	r)rRr[rWr`rar�r�r�r�rr�objectr
r
�_DEPRECATED_MSG�version_infor�r��	_warningsrIr�r�rMr�r��_warnings_defaultsrur��warnoptions�hasattrr��PendingDeprecationWarning�
ImportWarning�ResourceWarningrPrr�<module>r�s���,�
�.���
$�


�;
�| ���&$��$�$&���1��!J�F#*�!�E�E� ��
	�9�	�
F�>�89��*@�M�;�
�,#�!�,#�^>B��D�NL�V�L�,I@�V�I@�XU��-�4�3�CS�CS�4�(B�<�B�B�"�M� �L��� ���� ���3�*�+��y�+=�(��	4��X�(:�1�E��X�(A�!�L��X�
�a�@��X���B���5���G��M��L�������s�D�D�D

?>