MINI MINI MANI MO

Path : /lib64/python3.6/__pycache__/
File Upload :
Current File : //lib64/python3.6/__pycache__/warnings.cpython-36.opt-1.pyc

3


 \8H
@sdZddlZddddddd	d
gZd;ddZd<ddZd
dZddZeZddZeZ	ddZ
dedddfddZeddfddZ
ddZdd	ZGdddeZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd=d+dZd>d,dZGd-d.d.eZGd/d
d
eZdZy0dd0lmZm Z m!Z!mZmZm"Z"e Z#e!Z$d1ZWn.e%k
rfgZd2Z#iZ$d*a&d3d4Z"YnXeej'ese(e)gZ*e*j+e,xe*D]Z-e
d5e-d6qWej.j/Z/e/d*krd7Z0ne/rd2Z0nd5Z0e
e0e1d*d8e2ed9rd:Z3nd5Z3e
e3e4d*d8[dS)?z&Python part of the warnings subsystem.Nwarn
warn_explicitshowwarning
formatwarningfilterwarningssimplefilter
resetwarningscatch_warningscCst||||||}t|dS)z7Hook to write a warning to a file; replace if you like.N)WarningMessage_showwarnmsg_impl)messagecategoryfilenamelinenofilelinemsgr /usr/lib64/python3.6/warnings.pyr
scCst||||d|}t|S)z.Function to format a warning the standard way.N)r
_formatwarnmsg_impl)rr
rrrrrrrrscCsP|j}|dkr tj}|dkr dSt|}y|j|Wntk
rJYnXdS)N)rsysstderr_formatwarnmsgwriteOSError)rrtextrrrrsrcCsLd|j|j|jj|jf}|jdkr`yddl}|j|j|j}Wqftk
r\d}d}YqfXn|j}|r~|j	}|d|7}|j
dk	rHyddl}|j|j
}Wntk
rd}YnX|dk	rH|d7}xx|D]p}|d|j|jf7}y$|dk	r
|j|j|j}nd}Wntk
r*d}YnX|r|j	}|d|7}qW|S)Nz%s:%s: %s: %s
rz  %s
z.Object allocated at (most recent call first):
z  File "%s", lineno %s
z    %s
)
rrr
__name__rr	linecachegetline	Exceptionstripsourcetracemallocget_object_traceback)rsrrr"tbframerrrr#sF






rcCsdyt}Wntk
rYn<X|tk	rXt|s6td||j|j|j|j|j	|j
dSt|dS)z7Hook to write a warning to a file; replace if you like.z:warnings.showwarning() must be set to a function or methodN)r	NameError_showwarning_origcallable	TypeErrorrr
rrrrr)rswrrr_showwarnmsgUsr,cCsJyt}Wntk
rYn&X|tk	rB||j|j|j|j|jdSt|S)z.Function to format a warning the standard way.)r)	rr'_formatwarning_origrr
rrrr)rfwrrrrjs
rFcCs0ddl}t||j||j||j|||ddS)aInsert 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_add_filtercompileI)actionrr
modulerr0r1rrrrws	cCst|d|d||ddS)aInsert 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
    N)r0)r2)r5r
rr0rrrrscGsR|s6ytj|Wntk
r&YnXtjd|n|tkrHtj|tdS)Nr)filtersremove
ValueErrorinsertr0_filters_mutated)r0itemrrrr2s
r2cCsgtdd<tdS)zAClear the list of warning filters, so that no filters are active.N)r7r;rrrrrsc@seZdZdZdS)_OptionErrorz,Exception used by option processing helpers.N)r
__module____qualname____doc__rrrrr=sr=cCsRxL|D]D}yt|Wqtk
rH}ztd|tjdWYdd}~XqXqWdS)NzInvalid -W option ignored:)r)
_setoptionr=printrr)argsargrrrr_processoptionss

rEcCsddl}|jd}t|dkr,td|fxt|dkrF|jdq.Wdd|D\}}}}}t|}|j|}t|}|j|}|r|d}|ryt|}|dkrt	Wqt	t
fk
rtd	|fYqXnd}t|||||dS)
Nr:ztoo many fields (max 5): %rr/cSsg|]}|jqSr)r ).0r$rrr
<listcomp>sz_setoption.<locals>.<listcomp>$zinvalid lineno %r)r1splitlenr=r0
_getactionescape_getcategoryintr9
OverflowErrorr)rDr1partsr5rr
r6rrrrrAs.


rAcCsB|sdS|dkrdSxd	D]}|j|r|SqWtd|fdS)
Ndefaultallalwaysignorer6onceerrorzinvalid action: %r)rSrUrVr6rWrX)
startswithr=)r5arrrrMs

rMcCsddl}|stS|jd|rNyt|}Wqtk
rJtd|fYqXn|jd}|d|}||dd}yt|dd|g}Wn"tk
rtd|fYnXyt	||}Wn"t
k
rtd|fYnXt|tstd|f|S)Nrz^[a-zA-Z0-9_]+$zunknown warning category: %r.zinvalid module name: %rzinvalid warning category: %r)r1Warningmatchevalr'r=rfind
__import__ImportErrorgetattrAttributeError
issubclass)r
r1catir6klassmrrrrOs,

rOcCs|jj}d|kod|kS)zFSignal whether the frame is an internal CPython implementation detail.	importlib
_bootstrap)f_codeco_filename)r&rrrr_is_internal_framesrncCs&|j}x|dk	r t|r |j}qW|S)z;Find the next frame that doesn't involve CPython internals.N)f_backrn)r&rrr_next_external_frames
rpr\cCsvt|tr|j}|dkrt}t|to.t|tsDtdjt|jyZ|dks\t	t
jdrht
j|}n4t
jd}x(t|dD]}t
|}|dkrtqWWntk
rt
j}d}YnX|j}|j}d|kr|d}nd}|jd}	|	r|	j}
|
jdrP|	dd}	n>|dkrFyt
jd	}	Wntk
rDd}	YnX|	sP|}	|jd
i}t|||	|||||dS)z:Issue a warning, or maybe ignore it or raise an exception.Nz/category must be a Warning subclass, not '{:s}'r\rz<string>__file__z.pyc__main__rZ__warningregistry__)
isinstancer]	__class__UserWarningtyperer*formatrrnr	_getframerangerpr9__dict__	f_globalsf_linenogetlowerendswithargvrd
setdefaultr)rr

stacklevelr!r&xglobalsrr6rZfnlregistryrrrr
sL






cCst|}|dkr8|pd}|ddjdkr8|dd}|dkrDi}|jddtkrd|jt|d<t|tr~t|}|j}n|}||}|||f}	|j|	rdSx^t	D]R}
|
\}}}
}}|dks|j
|rt||
r|dks|j
|r|dks||krPqWt}|dkrd||	<dSddl
}|j|||dkr:||d	krnd||	<||f}tj|rddSdt|<nf|d
krznZ|dkrd||	<||df}|j|rdSd||<n$|dkrd||	<ntd
||
ft|||||}t|dS)Nz	<unknown>z.pyversionrrVr\rXrWrUr6rSz1Unrecognized action (%r) in warnings.filters:
 %sr)rPrr~_filters_versionclearrtr]strrur7r^re
defaultactionrgetlinesonceregistryRuntimeErrorr
r,)rr
rrr6rmodule_globalsr!rkeyr<r5rrfmodlnrZoncekeyZaltkeyrrrrAsl














c@s"eZdZd
Zdd	d
ZddZdS)r
rr
rrrrr!Nc
Cs:t}x|jD]}	t||	||	qW|r0|jnd|_dS)N)locals_WARNING_DETAILSsetattrr_category_name)
selfrr
rrrrr!local_valuesattrrrr__init__szWarningMessage.__init__cCsd|j|j|j|j|jfS)NzD{message : %r, category : %r, filename : %r, lineno : %s, line : %r})rrrrr)rrrr__str__szWarningMessage.__str__)rr
rrrrr!)NNN)rr>r?rrrrrrrr
s

r
c@s8eZdZdZdddddZddZd	d
ZddZdS)
r	aA 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.

    FN)recordr6cCs(||_|dkrtjdn||_d|_dS)zSpecify 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.

        NwarningsF)_recordrmodules_module_entered)rrr6rrrrszcatch_warnings.__init__cCsPg}|jr|jd|jtjdk	r4|jd|jt|j}d|dj|fS)Nzrecord=Truerz	module=%rz%s(%s)z, )rr0rrrrwrjoin)rrCnamerrr__repr__s

zcatch_warnings.__repr__cCs~|jrtd|d|_|jj|_|jdd|j_|jj|jj|_|jj|_|j	rvg}|j
|j_|jj|j_|SdSdS)NzCannot enter %r twiceT)rrrr7_filtersr;r_showwarningrrr0r()rlogrrr	__enter__s




zcatch_warnings.__enter__cGs>|jstd||j|j_|jj|j|j_|j|j_dS)Nz%Cannot exit %r without entering first)	rrrrr7r;rrr)rexc_inforrr__exit__s


zcatch_warnings.__exit__)rr>r?r@rrrrrrrrr	s
	)r7_defaultaction
_onceregistryrrr;TrScCstd7adS)Nr\)rrrrrr;sr;rV)r
rX)r
r0gettotalrefcountrU)NN)N)Nr\N)NNNN)5r@r__all__rrrrr(r,r-rr]rrr2rrr=rErArMrOrnrprrobjectr
r	Z_warnings_defaults	_warningsr7rrr;rrrbrwarnoptions
ImportWarningPendingDeprecationWarningZsilencer0DeprecationWarningclsflags
bytes_warningZbytes_actionBytesWarninghasattrZresource_actionResourceWarningrrrr<module>sv

0

	
5
FJ 





OHA YOOOO