Ñò §Úê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 & ticCseddk}||i||iƒ||i|ƒ|f}|oti|ƒntid|ƒ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ÿÿÿÿNi(tretcompiletItfilterstappendtinsert(tactionR R tmoduleRR Rtitem((s /usr/lib64/python2.6/warnings.pyR-s  cCsA|d|d|f}|oti|ƒntid|ƒdS(sƒInsert a simple entry into the list of warnings filters (at the front). A simple filter matches all modules and messages. iN(RRR R!(R"R RR R$((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.pyR&VscCsNxG|D]?}yt|ƒWqtj o}tidI|IJqXqWdS(NsInvalid -W option ignored:(t _setoptionR&RR(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( RtsplittlenR&R Rt _getactiontescapet _getcategorytintt ValueErrort OverflowErrorR( R+Rtpartst_[1]RR"R R R#R((s /usr/lib64/python2.6/warnings.pyR)cs0 /    cCs[|pdS|djodSx#d D]}|i|ƒo|Sq%Wtd|fƒ‚dS( NtdefaulttalltalwaystignoreR#tonceterrorsinvalid action: %r(sdefaultsalwayssignoresmodulesonceserror(t startswithR&(R"ta((s /usr/lib64/python2.6/warnings.pyR2~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( RtWarningtmatchtevalt NameErrorR&trfindt __import__Rt ImportErrortgetattrtAttributeErrort issubclass(R RtcattiR#tklasstm((s /usr/lib64/python2.6/warnings.pyR4ˆs,  c Csdt|tƒo |i}n|d jo t}nyti|ƒ}Wn"tj oti}d}nX|i }|i }d|jo|d}nd}|i dƒ}|o.|i ƒ}|i d ƒo|d }q2nP|djo1ytid }Wq!tj o d}q!Xn|p |}n|id hƒ} t|||||| |ƒd S( s:Issue a warning, or maybe ignore it or raise an exception.iRst__file__s.pycs.pyoiÿÿÿÿt__main__it__warningregistry__N(s.pycs.pyo(t isinstanceRCt __class__Rt UserWarningRt _getframeR6t__dict__t f_globalstf_linenotgettlowertendswithtargvRKt 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||iýÿÿÿs.pyiR=iR?R>R<R#R:s1Unrecognized action (%r) in warnings.filters: %st func_codet__func__iRsLfunctions overriding warnings.showwarning() must support the 'line' argument(R5RR\RTRCtstrRUR[RRDRLt defaultactionRtgetlinest onceregistryt RuntimeErrorthasattrRReRft co_varnamest co_argcounttco_flagsRRR (R R RRR#Rdtmodule_globalsttexttkeyR$R"R,RMtmodtlntoncekeytaltkeytfxn_codeR*t CO_VARARGStshowwarning_msg((s /usr/lib64/python2.6/warnings.pyR`Ë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(RR'R(R|RR‚Rƒ(((s /usr/lib64/python2.6/warnings.pyRzs  cBs8eZdZedd„Zd„Zd„Zd„ZRS(sA 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(RtrecordR#((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†ttypeRtjoin(RR*tname((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 Rz(R*tkwargs(tlog(s /usr/lib64/python2.6/warnings.pyRbs( R‰RktTrueR‡Rt_filtersRt _showwarningR…R(RR((Rs /usr/lib64/python2.6/warnings.pyt __enter__Ys    cGs@|iptd|ƒ‚n|i|i_|i|i_dS(Ns%Cannot exit %r without entering first(R‰RkR’R‡RR“R(Rtexc_info((s /usr/lib64/python2.6/warnings.pyt__exit__is N( RR'R(RˆRR‚RŽR”R–(((s /usr/lib64/python2.6/warnings.pyR3s  (Rtdefault_actiont once_registryRR`R:R=R R R?(*R(RRttypest__all__RR RRRRCRR%Rt ExceptionR&R-R)R2R4RR`tobjectRzRRˆt_warnings_defaultst _warningsRR—R˜RhRjR‘RIt warnoptionstPendingDeprecationWarningt ImportWarningtflagst bytes_warningt bytes_actiont BytesWarning(((s /usr/lib64/python2.6/warnings.pytsX             )SE(