Hacked By AnonymousFox

Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/warnings.cpython-33.pyo

�
��f6c@sndZddlZddlZddddddgZddd	d�Zdd
d�Zdeddd)dd�Z	edd)d
d�Z
dd�ZGdd�de�Z
dd�Zdd�Zdd�Zdd�Zdddd�Zddddd�ZGdd�de�ZGd d�de�Zd)Zy>dd!lmZmZmZmZmZeZeZd*ZWn$ek
r�gZd"ZiZYnXeej �esge!e"gZ#e#j$e%�xe#D]Z&e
d#d$e&�q�Wej'j(Z(e(dkrd%Z)ne(rd"Z)nd#Z)e
e)d$e*d&d�e+ed'�rHd(Z,nd#Z,e
e,d$e-d&d�n[dS(+u&Python part of the warnings subsystem.iNuwarnushowwarningu
formatwarningufilterwarningsu
resetwarningsucatch_warningsc
CsT|dkrtj}ny#|jt|||||��Wntk
rOYnXdS(u7Hook to write a warning to a file; replace if you like.N(uNoneusysustderruwriteu
formatwarninguIOError(umessageucategoryufilenameulinenoufileuline((u-/opt/alt/python33/lib64/python3.3/warnings.pyushowwarning
s#
cCsdd|||j|f}|dkr7tj||�n|}|r`|j�}|d|7}n|S(u.Function to format a warning the standard way.u%s:%s: %s: %s
u  %s
N(u__name__uNoneu	linecacheugetlineustrip(umessageucategoryufilenameulinenoulineus((u-/opt/alt/python33/lib64/python3.3/warnings.pyu
formatwarnings$ucCscddl}||j||j�||j|�|f}|rOtj|�ntjd|�dS(u�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
    iN(ureucompileuIufiltersuappenduinsert(uactionumessageucategoryumoduleulinenouappendureuitem((u-/opt/alt/python33/lib64/python3.3/warnings.pyufilterwarningss	cCs?|d|d|f}|r+tj|�ntjd|�dS(u�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
    iN(uNoneufiltersuappenduinsert(uactionucategoryulinenouappenduitem((u-/opt/alt/python33/lib64/python3.3/warnings.pyusimplefilter;susimplefiltercCsgtdd�<dS(uAClear the list of warning filters, so that no filters are active.N(ufilters(((u-/opt/alt/python33/lib64/python3.3/warnings.pyu
resetwarningsOscBs|EeZdZdZdS(u_OptionErroru,Exception used by option processing helpers.N(u__name__u
__module__u__qualname__u__doc__(u
__locals__((u-/opt/alt/python33/lib64/python3.3/warnings.pyu_OptionErrorSsu_OptionErrorcCsaxZ|D]R}yt|�Wqtk
rX}ztd|dtj�WYdd}~XqXqWdS(NuInvalid -W option ignored:ufile(u
_setoptionu_OptionErroruprintusysustderr(uargsuargumsg((u-/opt/alt/python33/lib64/python3.3/warnings.pyu_processoptionsXs

u_processoptionscCsPddl}|jd�}t|�dkrCtd|f��nx#t|�dkrh|jd�qFWdd�|D�\}}}}}t|�}|j|�}t|�}|j|�}|r�|d}n|r0y%t|�}|dkr�t	�nWq6t	t
fk
r,td	|f��Yq6Xnd}t|||||�dS(
Niu:iutoo many fields (max 5): %rucSsg|]}|j��qS((ustrip(u.0us((u-/opt/alt/python33/lib64/python3.3/warnings.pyu
<listcomp>gs	u_setoption.<locals>.<listcomp>u$uinvalid lineno %r(ureusplitulenu_OptionErroruappendu
_getactionuescapeu_getcategoryuintu
ValueErroru
OverflowErrorufilterwarnings(uargureupartsuactionumessageucategoryumoduleulineno((u-/opt/alt/python33/lib64/python3.3/warnings.pyu
_setoption`s.	

u
_setoptioncCsU|s
dS|dkrdSx!d	D]}|j|�r!|Sq!Wtd|f��dS(
Nudefaultuallualwaysuignoreumoduleuonceuerroruinvalid action: %r(udefaultualwaysuignoreumoduleuonceuerror(u
startswithu_OptionError(uactionua((u-/opt/alt/python33/lib64/python3.3/warnings.pyu
_getaction{s
u
_getactioncCs>ddl}|stS|jd|�rcyt|�}Wqtk
r_td|f��YqXn�|jd�}|d|�}||dd�}yt|dd|g�}Wn%t	k
r�td|f��YnXyt
||�}Wn%tk
rtd|f��YnXt|t�s:td|f��n|S(Niu^[a-zA-Z0-9_]+$uunknown warning category: %ru.iuinvalid module name: %ruinvalid warning category: %r(
ureuWarningumatchuevalu	NameErroru_OptionErrorurfindu
__import__uNoneuImportErrorugetattruAttributeErroru
issubclass(ucategoryureucatuiumoduleuklassum((u-/opt/alt/python33/lib64/python3.3/warnings.pyu_getcategory�s,


u_getcategoryic
CsZt|t�r|j}n|dkr0t}nytj|�}Wn!tk
rftj}d}YnX|j	}|j
}d|kr�|d}nd}|jd�}|r�|j�}|j
d�r(|dd�}q(nJ|dkrytjd	}Wqtk
rd}YqXn|s(|}n|jd
i�}	t||||||	|�dS(
u:Issue a warning, or maybe ignore it or raise an exception.iu__name__u<string>u__file__u.pycu.pyoNu__main__iu__warningregistry__(u.pycu.pyoi����(u
isinstanceuWarningu	__class__uNoneuUserWarningusysu	_getframeu
ValueErroru__dict__u	f_globalsuf_linenougetuloweruendswithuargvuAttributeErroru
setdefaultu
warn_explicit(
umessageucategoryu
stacklevelucalleruglobalsulinenoumoduleufilenameufnluregistry((u-/opt/alt/python33/lib64/python3.3/warnings.pyuwarn�s:	
			

	c
Cs�t|�}|dkrV|p!d}|dd�j�dkrV|dd�}qVn|dkrki}nt|t�r�t|�}|j}n|}||�}|||f}|j|�r�dSx�tD]|}	|	\}
}}}
}|dks|j	|�r�t
||�r�|
dks-|
j	|�r�|dksE||kr�Pq�q�Wt}
|
dkrmd||<dStj
||�|
dkr�|�n|
dkr�d||<||f}tj|�r�dSdt|<n�|
d	kr�nt|
d
kr(d||<||df}|j|�rdSd||<n/|
dkrAd||<ntd|
|	f��tt�srtd
��nt||||�dS(Nu	<unknown>iu.pyiuignoreiuerroruonceualwaysumoduleudefaultu1Unrecognized action (%r) in warnings.filters:
 %su:warnings.showwarning() must be set to a function or methodi����i����(uintuNoneuloweru
isinstanceuWarningustru	__class__ugetufiltersumatchu
issubclassu
defaultactionu	linecacheugetlinesuonceregistryuRuntimeErrorucallableushowwarningu	TypeError(umessageucategoryufilenameulinenoumoduleuregistryumodule_globalsutextukeyuitemuactionumsgucatumodulnuoncekeyualtkey((u-/opt/alt/python33/lib64/python3.3/warnings.pyu
warn_explicit�sf	

	




u
warn_explicitcBs>|EeZdZdZd
Zdddd	�Zd
d�ZdS(uWarningMessageu0Holds the result of a single showwarning() call.umessageucategoryufilenameulinenoufileulinec	CsMt�}x%|jD]}t||||�qW|r@|jnd|_dS(N(ulocalsu_WARNING_DETAILSusetattru__name__uNoneu_category_name(	uselfumessageucategoryufilenameulinenoufileulineulocal_valuesuattr((u-/opt/alt/python33/lib64/python3.3/warnings.pyu__init__s	uWarningMessage.__init__cCs&d|j|j|j|j|jfS(NuD{message : %r, category : %r, filename : %r, lineno : %s, line : %r}(umessageu_category_nameufilenameulinenouline(uself((u-/opt/alt/python33/lib64/python3.3/warnings.pyu__str__suWarningMessage.__str__N(umessageucategoryufilenameulinenoufileuline(u__name__u
__module__u__qualname__u__doc__u_WARNING_DETAILSuNoneu__init__u__str__(u
__locals__((u-/opt/alt/python33/lib64/python3.3/warnings.pyuWarningMessage
suWarningMessagecBsV|EeZdZdZdd
dddd�Zdd�Zdd	�Zd
d�Z	dS(ucatch_warningsu�A 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.

    urecordumodulecCs8||_|dkr"tjdn||_d|_dS(u�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.

        uwarningsNF(u_recorduNoneusysumodulesu_moduleuFalseu_entered(uselfurecordumodule((u-/opt/alt/python33/lib64/python3.3/warnings.pyu__init__2s	"ucatch_warnings.__init__cCsrg}|jr|jd�n|jtjdk	rL|jd|j�nt|�j}d|dj|�fS(Nurecord=Trueuwarningsu	module=%ru%s(%s)u, (u_recorduappendu_moduleusysumodulesutypeu__name__ujoin(uselfuargsuname((u-/opt/alt/python33/lib64/python3.3/warnings.pyu__repr__>s	ucatch_warnings.__repr__cs�|jrtd|��nd|_|jj|_|jdd�|j_|jj|_|jr�g��fdd�}||j_�SdSdS(NuCannot enter %r twicecs�jt||��dS(N(uappenduWarningMessage(uargsukwargs(ulog(u-/opt/alt/python33/lib64/python3.3/warnings.pyushowwarningPsu-catch_warnings.__enter__.<locals>.showwarningT(
u_entereduRuntimeErroruTrueu_moduleufiltersu_filtersushowwarningu_showwarningu_recorduNone(uselfushowwarning((ulogu-/opt/alt/python33/lib64/python3.3/warnings.pyu	__enter__Gs			ucatch_warnings.__enter__cGs>|jstd|��n|j|j_|j|j_dS(Nu%Cannot exit %r without entering first(u_entereduRuntimeErroru_filtersu_moduleufiltersu_showwarningushowwarning(uselfuexc_info((u-/opt/alt/python33/lib64/python3.3/warnings.pyu__exit__Ws	ucatch_warnings.__exit__NF(
u__name__u
__module__u__qualname__u__doc__uFalseuNoneu__init__u__repr__u	__enter__u__exit__(u
__locals__((u-/opt/alt/python33/lib64/python3.3/warnings.pyucatch_warnings!s
	(ufiltersu_defaultactionu
_onceregistryuwarnu
warn_explicitudefaultuignoreucategoryuerroruappendugettotalrefcountualwaysFT(.u__doc__u	linecacheusysu__all__uNoneushowwarningu
formatwarninguWarninguFalseufilterwarningsusimplefilteru
resetwarningsu	Exceptionu_OptionErroru_processoptionsu
_setoptionu
_getactionu_getcategoryuwarnu
warn_explicituobjectuWarningMessageucatch_warningsu_warnings_defaultsu	_warningsufiltersu_defaultactionu
_onceregistryu
defaultactionuonceregistryuTrueuImportErroruwarnoptionsu
ImportWarninguPendingDeprecationWarningusilenceuappenduDeprecationWarninguclsuflagsu
bytes_warningubytes_actionuBytesWarninguhasattruresource_actionuResourceWarning(((u-/opt/alt/python33/lib64/python3.3/warnings.pyu<module>s^		
)DE(




			

Hacked By AnonymousFox1.0, Coded By AnonymousFox