Ñò §Úê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.iRst__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||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(RR5R6RRR‡Rˆ(((s /usr/lib64/python2.6/warnings.pyRs  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(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( RR5R6RRR‡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@RBRRetobjectRRRt_warnings_defaultst _warningsR.R›RœRmRoR•RPt warnoptionstPendingDeprecationWarningt ImportWarningtflagst bytes_warningt bytes_actiont BytesWarning(((s /usr/lib64/python2.6/warnings.pytsX             )SE(