Hacked By AnonymousFox

Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/warnings.cpython-35.opt-2.pyc



���]�=�@s�ddlZdddddddd	gZddd
d�Zddd�Zdeddd
dd�Zedd
dd�Zdd�Zdd�ZGdd�de	�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zdd!d"d�Zdddd#d�ZGd$d%�d%e�ZGd&d	�d	e�Zd
ZyDdd'lmZmZmZmZmZmZeZeZd(ZWn6ek
r�gZd)ZiZd!ad*d+�ZYnXeej �es�e!e"gZ#e#j$e%�xe#D]Z&ed,d-e&�q�Wej'j(Z(e(d!kr5d.Z)ne(rDd)Z)nd,Z)ee)d-e*d/d!�e+ed0�rxd1Z,nd,Z,ee,d-e-d/d!�[dS)2�N�warn�
warn_explicit�showwarning�
formatwarning�filterwarnings�simplefilter�
resetwarnings�catch_warningsc
Csa|dkr%tj}|dkr%dSy#|jt|||||��Wntk
r\YnXdS)N)�sys�stderr�writer�OSError)�message�category�filename�lineno�file�line�r�-/opt/alt/python35/lib64/python3.5/warnings.pyr
s	#
cCs�d|||j|f}|dkrby"ddl}|j||�}Wntk
rad}YnX|r�|j�}|d|7}|S)Nz%s:%s: %s: %s
rz  %s
)�__name__�	linecache�getline�	Exception�strip)rrrrr�srrrrrs
�FcCsDddl}t||j||j�||j|�|d|�dS)Nr�append)�re�_add_filter�compile�I)�actionrr�modulerrrrrrr&s	cCs t|d|d|d|�dS)Nr)r)r"rrrrrrr>scGsc|s?ytj|�Wntk
r+YnXtjd|�n|tkrXtj|�t�dS)Nr)�filters�remove�
ValueError�insertr�_filters_mutated)r�itemrrrrNs

rcCsgtdd�<t�dS)N)r$r(rrrrr\sc@seZdZdS)�_OptionErrorN)r�
__module__�__qualname__rrrrr*asr*cCsaxZ|D]R}yt|�Wqtk
rX}ztd|dtj�WYdd}~XqXqWdS)NzInvalid -W option ignored:r)�
_setoptionr*�printr
r)�args�arg�msgrrr�_processoptionsfs

r2cCsGddl}|jd�}t|�dkr@td|f��x#t|�dkre|jd�qCWdd�|D�\}}}}}t|�}|j|�}t|�}|j|�}|r�|d}|r'y"t|�}|dkr�t	�Wq-t	t
fk
r#td	|f��Yq-Xnd}t|||||�dS)
Nr�:�ztoo many fields (max 5): %rrcSsg|]}|j��qSr)r)�.0rrrr�
<listcomp>us	z_setoption.<locals>.<listcomp>�$zinvalid lineno %r)r�split�lenr*r�
_getaction�escape�_getcategory�intr&�
OverflowErrorr)r0r�partsr"rrr#rrrrr-ns.	

r-cCsU|s
dS|dkrdSx!d	D]}|j|�r!|Sq!Wtd|f��dS)
N�default�all�always�ignorer#�once�errorzinvalid action: %r)r@rBrCr#rDrE)�
startswithr*)r"�arrrr:�s
r:cCs;ddl}|stS|jd|�rcyt|�}Wqtk
r_td|f��YqXn�|jd�}|d|�}||dd�}yt|dd|g�}Wn%tk
r�td|f��YnXyt	||�}Wn%t
k
rtd|f��YnXt|t�s7td|f��|S)Nrz^[a-zA-Z0-9_]+$zunknown warning category: %r�.�zinvalid module name: %rzinvalid warning category: %r)r�Warning�match�eval�	NameErrorr*�rfind�
__import__�ImportError�getattr�AttributeError�
issubclass)rr�cat�ir#�klass�mrrrr<�s,


r<cCs"|jj}d|ko!d|kS)N�	importlib�
_bootstrap)�f_code�co_filename)�framerrrr�_is_internal_frame�sr]cCs5|j}x%|dk	r0t|�r0|j}qW|S)N)�f_backr])r\rrr�_next_external_frame�s	
r_rIcCs�t|t�r|j}|dkr*t}t|t�oEt|t�sftdjt|�j���y|dks�t	t
jd��r�t
j|�}nHt
jd�}x6t|d�D]$}t
|�}|dkr�t�q�WWn!tk
rt
j}d}YnX|j}|j}d|kr4|d}nd}|jd�}|r}|j�}	|	jd�r�|dd
�}nD|dkr�yt
jd}Wntk
r�d}YnX|s�|}|jd	i�}
t||||||
|�dS)Nz/category must be a Warning subclass, not '{:s}'rIrz<string>�__file__z.pyc�__main__rZ__warningregistry__���)�
isinstancerJ�	__class__�UserWarning�typerS�	TypeError�formatrr]r
�	_getframe�ranger_r&�__dict__�	f_globals�f_lineno�get�lower�endswith�argvrR�
setdefaultr)rr�
stacklevelr\�x�globalsrr#rZfnl�registryrrrr�sL		!
			

cCs�t|�}|dkrP|p!d}|dd�j�dkrP|dd�}|dkrbi}|jdd�tkr�|j�t|d<t|t�r�t|�}|j}n|}||�}|||f}|j|�r�dSx�t	D]y}	|	\}
}}}
}|dks&|j
|�r�t||�r�|
dksP|
j
|�r�|dksh||kr�Pq�Wt}
|
dkr�d||<dSddl
}|j||�|
dkr�|�|
d	kr�d||<||f}tj|�r�dSdt|<n�|
d
krnt|
dkrQd||<||df}|j|�rDdSd||<n/|
dkrjd||<ntd
|
|	f��tt�s�td��t||||�dS)Nz	<unknown>�z.py�versionrrCrIrErDrBr#r@z1Unrecognized action (%r) in warnings.filters:
 %sz:warnings.showwarning() must be set to a function or method���ry)r=rorn�_filters_version�clearrcrJ�strrdr$rKrS�
defaultactionr�getlines�onceregistry�RuntimeError�callablerrg)rrrrr#rv�module_globals�text�keyr)r"r1rT�mod�lnrZoncekeyZaltkeyrrrr�sn








c@s4eZdZdZdddd	�Zd
d�ZdS)
�WarningMessagerrrrrrNc	CsMt�}x%|jD]}t||||�qW|r@|jnd|_dS)N)�locals�_WARNING_DETAILS�setattrr�_category_name)	�selfrrrrrr�local_values�attrrrr�__init__@s	zWarningMessage.__init__cCs&d|j|j|j|j|jfS)NzD{message : %r, category : %r, filename : %r, lineno : %s, line : %r})rr�rrr)r�rrr�__str__GszWarningMessage.__str__)rrrrrr)rr+r,r�r�r�rrrrr�9s
r�c@sLeZdZdddddd�Zdd�Zd	d
�Zdd�ZdS)
r	�recordFr#NcCs8||_|dkr"tjdn||_d|_dS)N�warningsF)�_recordr
�modules�_module�_entered)r�r�r#rrrr�^s	"zcatch_warnings.__init__cCslg}|jr|jd�|jtjdk	rF|jd|j�t|�j}d|dj|�fS)Nzrecord=Truer�z	module=%rz%s(%s)z, )r�rr�r
r�rfr�join)r�r/�namerrr�__repr__js	
zcatch_warnings.__repr__cs�|jrtd|��d|_|jj|_|jdd�|j_|jj�|jj|_|jr�g��fdd�}||j_�SdSdS)NzCannot enter %r twiceTcs�jt||��dS)N)rr�)r/�kwargs)�logrrr}sz-catch_warnings.__enter__.<locals>.showwarning)	r�r�r�r$�_filtersr(r�_showwarningr�)r�rr)r�r�	__enter__ss		
	zcatch_warnings.__enter__cGsH|jstd|��|j|j_|jj�|j|j_dS)Nz%Cannot exit %r without entering first)r�r�r�r�r$r(r�r)r��exc_inforrr�__exit__�s
	
zcatch_warnings.__exit__)rr+r,r�r�r�r�rrrrr	Ms	)r$�_defaultaction�
_onceregistryrrr(Tr@cCstd7adS)NrI)rzrrrrr(�sr(rCrrEr�gettotalrefcountrB).r
�__all__rrrJrrrrrr*r2r-r:r<r]r_rr�objectr�r	Z_warnings_defaults�	_warningsr$r�r�r(r}rrPrz�warnoptions�
ImportWarning�PendingDeprecationWarningZsilencer�DeprecationWarning�cls�flags�
bytes_warningZbytes_action�BytesWarning�hasattrZresource_action�ResourceWarningrrrr�<module>sf		
	5HG.




			

Hacked By AnonymousFox1.0, Coded By AnonymousFox