b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/warnings.pyc
Size12.74 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:29
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc
@s3dZddkZddkZddkZddddddgZdd d
�Zddd �ZeZdd �Z d
e
d
ddd�Z e
ddd�Z d�Z
defd��YZd�Zd�Zd�Zd�Zdd d�Zdddd�Zdefd��YZdefd��YZeZy>ddklZlZlZlZlZeZeZ e!ZWn%e"j
ogZdZhZ nXeei#�ep�e dd e$d!d �e dd e%d!d �ei&i'Z'e'd jo
d"Z(ne'o
dZ(ndZ(e e(d e)d!d �n[dS(#s&Python part of the warnings subsystem.iÿÿÿÿNtwarnt showwarningt
formatwarningtfilterwarningst
resetwarningstcatch_warningsicCs=tio/|djo
t}nt|||d�ndS(s�Issue a deprecation warning for Python 3.x related changes.

Warnings are omitted unless Python is started with the -3 option.
iN(tsyst py3kwarningtNonetDeprecationWarningR(tmessagetcategoryt
stacklevel((s /usr/lib64/python2.6/warnings.pytwarnpy3ks


c
CsW|djo
ti}ny#|it|||||��Wntj
onXdS(s7Hook to write a warning to a file; replace if you like.N(RRtstderrtwriteRtIOError(R
R tfilenametlinenotfiletline((s /usr/lib64/python2.6/warnings.pyt
_show_warnings 

#cCshd|||i|f}|djoti||�n|}|o|i�}|d|7}n|S(s.Function to format a warning the standard way.s%s:%s: %s: %s
s %s
N(t__name__Rt linecachetgetlinetstrip(R
R RRRts((s /usr/lib64/python2.6/warnings.pyR$s & ticCsddk}|djptd |f�t|t�p
td
�t|ttif�p
td �t|t�p
td �t|t�p
td
�t|t �o
|djp
td�||i
||i �||i
|�|f}|ot i
|�nt id|�dS(s�Insert an entry into the list of warnings filters (at the front).

Use assertions to check that all arguments have the right type.iÿÿÿÿNterrortignoretalwaystdefaulttmoduletoncesinvalid action: %rsmessage must be a stringscategory must be a classs#category must be a Warning subclasssmodule must be a stringislineno must be an int >= 0(serrorsignoresalwayssdefaultsmodulesonce(tretAssertionErrort
isinstancet
basestringttypettypest ClassTypet
issubclasstWarningtinttcompiletItfilterstappendtinsert(tactionR
R R RR/R"titem((s /usr/lib64/python2.6/warnings.pyR-s  cCs�|d jptd|f�t|t�o
|djp
td �|d
|d
|f}|oti|�ntid|�d
S( s�Insert a simple entry into the list of warnings filters (at the front).

A simple filter matches all modules and messages.
RRRRR R!sinvalid action: %rislineno must be an int >= 0N(serrorsignoresalwayssdefaultsmodulesonce(R#R$R+RR.R/R0(R1R RR/R2((s /usr/lib64/python2.6/warnings.pyt simplefilterCs cCs gt(dS(sAClear the list of warning filters, so that no filters are active.N(R.(((s /usr/lib64/python2.6/warnings.pyRRst _OptionErrorcBseZdZRS(s,Exception used by option processing helpers.(Rt
__module__t__doc__(((s /usr/lib64/python2.6/warnings.pyR4VscCsNxG|D]?}yt|�Wqtj
o}tidI|IJqXqWdS(NsInvalid -W option ignored:(t
_setoptionR4RR(targstargtmsg((s /usr/lib64/python2.6/warnings.pyt_processoptions[s c
Csoddk}|id�}t|�djotd|f��nx%t|�djo|id�qHWg}|D]}||i�qx~\}}}}} t|�}|i|�}t|�}|i|�}|o|d}n| oZy't | �} | djo
t
�nWqUt
t fj
otd| f��qUXnd} t ||||| �dS( Niÿÿÿÿt:istoo many fields (max 5): %rRt$isinvalid lineno %r(
R"tsplittlenR4R/Rt
_getactiontescapet _getcategoryR+t
ValueErrort
OverflowErrorR(
R9R"tpartst_[1]RR1R
R R R((s /usr/lib64/python2.6/warnings.pyR7cs0 /   
cCs[|pdS|djodSx#d D]}|i|�o|Sq%Wtd|f��dS(
NRtallRRR R!Rsinvalid action: %r(sdefaultsalwayssignoresmodulesonceserror(t
startswithR4(R1ta((s /usr/lib64/python2.6/warnings.pyR@~s
 c Cs;ddk}|ptS|id|�o=yt|�}Wqtj
otd|f��qXn©|id�}|| }||d}yt|dd|g�}Wn&t j
otd|f��nXyt
||�}Wn&t j
otd|f��nXt |t�ptd|f��n|S(Niÿÿÿÿs^[a-zA-Z0-9_]+$sunknown warning category: %rt.isinvalid module name: %rsinvalid warning category: %r(
R"R*tmatchtevalt NameErrorR4trfindt
__import__Rt ImportErrortgetattrtAttributeErrorR)(R R"tcattiR tklasstm((s /usr/lib64/python2.6/warnings.pyRB�s, 
c
Cs{t|t�o
|i}n|d jo
t}nt|t�pt�yti|�}Wn"t j
oti
}d}nX|i }|i }d|jo|d}nd}|i
d�}|o.|i�}|id �o|d }qInP|djo1ytid }Wq8tj
o
d}q8Xn|p
|}n|id
h�} t|||||| |�d S(
s:Issue a warning, or maybe ignore it or raise an exception.iRs<string>t__file__s.pycs.pyoiÿÿÿÿt__main__it__warningregistry__N(s.pycs.pyo(R$R*t __class__Rt UserWarningR)R#Rt _getframeRCt__dict__t f_globalstf_linenotgettlowertendswithtargvRRt
setdefaultt
warn_explicit(
R
R R tcallertglobalsRR Rtfnltregistry((s /usr/lib64/python2.6/warnings.pyR£s<


    
 

c
Cs@t|�}|djo6|pd}|di�djo|d }qOn|djo
h}nt|t�ot|�}|i}n|}||�}|||f}|i|�odSx�tD]�} | \}
} } }
}| djp| i |�oLt
|| �o<|
djp|
i |�o|djp
||joPqÌqÌWt }
|
djod||<dSt i
||�|
djo
|�n|
djo9d||<||f}ti|�odSdt|<n�|
d jon{|
d
jo<d||<||df}|i|�odSd||<n2|
d jod||<ntd |
| f��d}ttd
�o
ti}n!ttd�otii}n|oq|i|i }d}d|joJ|i|@ o;d}||jot||||�q%t|t�q)nt||||�dS(Ns <unknown>iýÿÿÿs.pyiRiRR!RR Rs1Unrecognized action (%r) in warnings.filters:
%st func_codet__func__iRsLfunctions overriding warnings.showwarning() must support the 'line' argument(R+RRaR$R*tstrRZR`R.RKR)t
defaultactionRtgetlinest onceregistryt RuntimeErrorthasattrRRjRkt co_varnamest co_argcounttco_flagsRRR (R
R RRR Ritmodule_globalsttexttkeyR2R1R:RStmodtlntoncekeytaltkeytfxn_codeR8t
CO_VARARGStshowwarning_msg((s /usr/lib64/python2.6/warnings.pyReËs~ 



 
  





 





tWarningMessagecBs,eZdZd Zd
d
d�Zd�ZRS( s0Holds the result of a single showwarning() call.R
R RRRRc CsOt�}x%|iD]}t||||�qW|o
|ind|_dS(N(tlocalst_WARNING_DETAILStsetattrRRt_category_name( tselfR
R RRRRt local_valuestattr((s /usr/lib64/python2.6/warnings.pyt__init__&s
 
cCs&d|i|i|i|i|ifS(NsD{message : %r, category : %r, filename : %r, lineno : %s, line : %r}(R
R�RRR(R�((s /usr/lib64/python2.6/warnings.pyt__str__-s (smessagescategorysfilenameslinenosfileslineN(RR5R6R�RR�R�(((s /usr/lib64/python2.6/warnings.pyRs  cBs8eZdZedd�Zd�Zd�Zd�ZRS(s�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.

cCs:||_|djotidn||_t|_dS(sê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.

twarningsN(t_recordRRtmodulest_moduletFalset_entered(R�trecordR ((s /usr/lib64/python2.6/warnings.pyR�Ds $cCsvg}|io|id�n|itidj o|id|i�nt|�i}d|di|�fS(Ns record=TrueR�s module=%rs%s(%s)s, (R�R/R�RR�R&Rtjoin(R�R8tname((s /usr/lib64/python2.6/warnings.pyt__repr__Ps
cs�|iotd|��nt|_|ii|_|i|i_|ii|_|io&g��fd�}||i_�SdSdS(NsCannot enter %r twicecs�it||��dS(N(R/R(R8tkwargs(tlog(s /usr/lib64/python2.6/warnings.pyRbs(
R�RptTrueR�R.t_filtersRt _showwarningR�R(R�R((R�s /usr/lib64/python2.6/warnings.pyt __enter__Ys
 
 cGs@|iptd|��n|i|i_|i|i_dS(Ns%Cannot exit %r without entering first(R�RpR�R�R.R�R(R�texc_info((s /usr/lib64/python2.6/warnings.pyt__exit__is
N( RR5R6R�RR�R�R�R�(((s /usr/lib64/python2.6/warnings.pyR3s
 (R.tdefault_actiont
once_registryRReRRR R/R(*R6RRR't__all__RR
RRRR*RR3Rt ExceptionR4R;R7R@RBRRetobjectRRR�t_warnings_defaultst _warningsR.R�R�RmRoR�RPt warnoptionstPendingDeprecationWarningt
ImportWarningtflagst
bytes_warningt bytes_actiont BytesWarning(((s /usr/lib64/python2.6/warnings.pyt<module>sX     

     
)SE(