AlkantarClanX12

Your IP : 18.117.71.239


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/warnings.cpython-310.opt-2.pyc

o

6��f�L�@s�	ddlZgd�Zd<dd�Zd=dd�Zdd�Zd	d
�ZeZdd�ZeZd
d�Z	de
dddfdd�Ze
ddfdd�Zdd�Z
dd�ZGdd�de�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd>d(d)�Z		d?d*d+�ZGd,d-�d-e�ZGd.d/�d/e�Zd0d1�Zzdd2lmZmZm Z mZmZm!Z!eZ"e Z#d3Z$Wne%y�gZd4Z"iZ#d'a&d5d6�Z!dZ$Ynweej'�e$s�e(ed7�s�ed4e)d8d'd9�ed:e)d'd;�ed:e*d'd;�ed:e+d'd;�ed:e,d'd;�[$dS)@�N)�warn�
warn_explicit�showwarning�
formatwarning�filterwarnings�simplefilter�
resetwarnings�catch_warningscCs 	t||||||�}t|�dS�N)�WarningMessage�_showwarnmsg_impl)�message�category�filename�lineno�file�line�msg�r�//opt/alt/python310/lib64/python3.10/warnings.pyr
srcCs	t||||d|�}t|�Sr
)r�_formatwarnmsg_impl)r
rrrrrrrrrsrcCsN|j}|durtj}|durdSt|�}z|�|�WdSty&YdSwr
)r�sys�stderr�_formatwarnmsg�write�OSError)rr�textrrrrs�rc		Cs�|jj}|j�d|j�d|�d|j�d�}|jdur6zddl}|�|j|j�}Wnty5d}d}Ynw|j}|rE|�	�}|d|7}|j
dur�zddl}Wn
ty]d}d}Ynw|��}z|�
|j
�}Wntyud}Ynw|dur�|d7}|D]5}|d|j|jf7}z|dur�|�|j|j�}nd}Wnty�d}Ynw|r�|�	�}|d	|7}q�|S|s�||�d
�7}|S)N�:z: �
rz  %s
Tz-Object allocated at (most recent call last):
z  File "%s", lineno %s
z    %s
z<: Enable tracemalloc to get the object allocation traceback
)r�__name__rrr
r�	linecache�getline�	Exception�strip�source�tracemalloc�
is_tracing�get_object_traceback)	rr�sr rr%�tracing�tb�framerrrr#sb"
�
��
�����rcCsd	zt}Wn	tyYnw|tur,t|�std��||j|j|j|j|j	|j
�dSt|�dS)Nz:warnings.showwarning() must be set to a function or method)r�	NameError�_showwarning_orig�callable�	TypeErrorr
rrrrrr)r�swrrr�_showwarnmsg`s��r1cCsN	zt}WntyYt|�Sw|tur#||j|j|j|j|j�St|�Sr
)	rr,�_formatwarning_origr
rrrrr)r�fwrrrrus�
�r�FcCsV	|s|r	ddl}|r|�||j�}nd}|r|�|�}nd}t||||||d�dS)Nr��append)�re�compile�I�_add_filter)�actionr
r�modulerr6r7rrrr�srcCs	t|d|d||d�dS)Nr5)r:)r;rrr6rrrr�s
rcGsP|szt�|�Wn	tyYnwt�d|�n	|tvr#t�|�t�dS)Nr)�filters�remove�
ValueError�insertr6�_filters_mutated)r6�itemrrrr:�s�

r:cCs	gtdd�<t�dSr
)r=rArrrrr�s
rc@seZdZ	dS)�_OptionErrorN)r�
__module__�__qualname__rrrrrC�srCcCsN|D]"}zt|�Wqty$}ztd|tjd�WYd}~qd}~wwdS)NzInvalid -W option ignored:)r)�
_setoptionrC�printrr)�args�argrrrr�_processoptions�s���rJc	Cs�|�d�}t|�dkrtd|f��t|�dkr#|�d�t|�dksdd�|D�\}}}}}t|�}t|�}|s;|r?ddl}|rF|�|�}|rO|�|�d}|rozt|�}|dkr\t	�Wnt	t
fyntd	|f�d�wd}t|||||�dS)
Nr�ztoo many fields (max 5): %rr4cSsg|]}|���qSr)r#)�.0r(rrr�
<listcomp>�s�z_setoption.<locals>.<listcomp>rz\Zzinvalid lineno %r)�split�lenrCr6�
_getaction�_getcategoryr7�escape�intr?�
OverflowErrorr)rI�partsr;r
rr<rr7rrrrF�s8

��
��rFcCs>|sdS|dkr
dSdD]}|�|�r|Sqtd|f��)N�default�all�always)rVrX�ignorer<�once�errorzinvalid action: %r)�
startswithrC)r;�arrrrP�s
�rPcCs�|stSd|vrddl}|}n"|�d�\}}}z
t|dd|g�}Wnty0td|f�d�wzt||�}WntyGtd|f�d�wt|t�sTtd|f��|S)N�.rzinvalid module name: %rzunknown warning category: %rzinvalid warning category: %r)	�Warning�builtins�
rpartition�
__import__�ImportErrorrC�getattr�AttributeError�
issubclass)r�m�klassr<�_�catrrrrQ�s&��
rQcCs	|jj}d|vod|vS)N�	importlib�
_bootstrap)�f_code�co_filename)r+rrrr�_is_internal_framesrocCs2	|j}|durt|�r|j}|durt|�s|Sr
)�f_backro)r+rrr�_next_external_frames�rq�c	Cs	t|t�r	|j}|durt}t|t�rt|t�s#td�t|�j���z+|dks/t	t
�d��r5t
�|�}nt
�d�}t|d�D]}t
|�}|durLt�q@Wnty^t
j}d}d}Ynw|j}|jj}|j}d|vrr|d}	nd}	|�di�}
t|||||	|
||�dS)Nz/category must be a Warning subclass, not '{:s}'rrrrz<string>Z__warningregistry__)�
isinstancer_�	__class__�UserWarning�typerfr/�formatrror�	_getframe�rangerqr?�__dict__�	f_globalsrmrn�f_lineno�
setdefaultr)r
r�
stacklevelr$r+�x�globalsrrr<�registryrrrrsD
�
���
�rcCs�t|�}|dur|pd}|dd���dkr|dd�}|dur"i}|�dd�tkr2|��t|d<t|t�r?t|�}|j}n|}||�}|||f}	|�|	�rQdSt	D]*}
|
\}}}
}}|duse|�
|�r}t||
�r}|duss|�
|�r}|dks{||kr}nqSt}|dkr�dSddl
}|�||�|dkr�|�|dkr�d	||	<||f}t�|�r�dSd	t|<n/|d
kr�n*|dkr�d	||	<||df}|�|�r�dSd	||<n|dkr�d	||	<ntd
||
f��t|||||�}t|�dS)Nz	<unknown>���z.py�versionrrYr[rZrrrXr<rVz1Unrecognized action (%r) in warnings.filters:
 %s)rS�lower�get�_filters_version�clearrsr_�strrtr=�matchrf�
defaultactionr �getlines�onceregistry�RuntimeErrorrr1)r
rrrr<r��module_globalsr$r�keyrBr;rrj�modZlnr ZoncekeyZaltkeyrrrrGsr


��





��rc@s&eZdZdZ		ddd�Zdd�ZdS)r)r
rrrrrr$NcCsD||_||_||_||_||_||_||_|r|j|_dSd|_dSr
)	r
rrrrrr$r�_category_name)�selfr
rrrrrr$rrr�__init__�szWarningMessage.__init__cCsd|j|j|j|j|jfS)NzD{message : %r, category : %r, filename : %r, lineno : %s, line : %r})r
r�rrr)r�rrr�__str__�s
��zWarningMessage.__str__)NNN)rrDrE�_WARNING_DETAILSr�r�rrrrr�s
�rc@s6eZdZ	ddd�dd�Zdd�Zdd	�Zd
d�ZdS)r	FN)�recordr<cCs*	||_|dur
tjdn||_d|_dS)N�warningsF)�_recordr�modules�_module�_entered)r�r�r<rrrr��s
zcatch_warnings.__init__cCsPg}|jr
|�d�|jtjdur|�d|j�t|�j}d|d�|�fS)Nzrecord=Truer�z	module=%rz%s(%s)z, )r�r6r�rr�rvr�join)r�rH�namerrr�__repr__�s

zcatch_warnings.__repr__cCsz|jr	td|��d|_|jj|_|jdd�|j_|j��|jj|_|jj|_|j	r;g}|j
|j_|jj|j_|SdS)NzCannot enter %r twiceT)r�r�r�r=�_filtersrAr�_showwarningrr�r6r-)r��logrrr�	__enter__�s




zcatch_warnings.__enter__cGs>|js	td|��|j|j_|j��|j|j_|j|j_dS)Nz%Cannot exit %r without entering first)	r�r�r�r�r=rAr�rr)r��exc_inforrr�__exit__�s


zcatch_warnings.__exit__)rrDrEr�r�r�r�rrrrr	�s	r	cszd�j�d�g}�jdur+ddl�ddl}��fdd�}|�d�||�t|���7}d�|��d�}t	|t
d	�d
�dS)Nzcoroutine 'z' was never awaited
rc3s6�t�j�D]\}}}��||�}||||fVqdSr
)�reversed�	cr_originr!)rr�funcnamer��coror rr�extract�s
��z*_warn_unawaited_coroutine.<locals>.extractz-Coroutine created at (most recent call last)
r4r�)rr~r$)rEr�r �	tracebackr6�format_list�listr��rstripr�RuntimeWarning)r��	msg_linesr�r�rrr�r�_warn_unawaited_coroutine�s�

r�)r=�_defaultaction�
_onceregistryrrrATrVcCstd7adS)Nrr)r�rrrrrAsrAZgettotalrefcount�__main__)rr<r6rY)rr6)NNr
)NrrN)NNNN)-r�__all__rrrrr-r1r2rr_rrr:rr"rCrJrFrPrQrorqrr�objectrr	r��	_warningsr=r�r�rAr�r�Z_warnings_defaultsrcr��warnoptions�hasattr�DeprecationWarning�PendingDeprecationWarning�
ImportWarning�ResourceWarningrrrr�<module>sn

;

�#

	)
�GC �

�