ž §ÿf6c@sndZddlZddlZddddddgZddd d„Zdd d„Zd ed dd)d d„Z edd)d d„Z dd„Z Gdd„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.iNuwarnu showwarningu 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.pyu showwarning 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(uInsert 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…gs u_setoption..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%t k 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__uNoneu ImportErrorugetattruAttributeErroru 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}|j dƒ}|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__uu__file__u.pycu.pyoNu__main__iu__warningregistry__(u.pycu.pyoiÿÿÿÿ(u isinstanceuWarningu __class__uNoneu UserWarningusysu _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||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 RuntimeErrorucallableu showwarningu 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_warningsuA 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(Nu record=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|_|jrg‰‡fdd†}||j_ˆSdSdS(NuCannot enter %r twicecsˆjt||ŽƒdS(N(uappenduWarningMessage(uargsukwargs(ulog(u-/opt/alt/python33/lib64/python3.3/warnings.pyu showwarningPsu-catch_warnings.__enter__..showwarningT( u_enteredu RuntimeErroruTrueu_moduleufiltersu_filtersu showwarningu _showwarningu_recorduNone(uselfu showwarning((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 _showwarningu showwarning(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__uNoneu showwarningu formatwarninguWarninguFalseufilterwarningsu simplefilteru resetwarningsu Exceptionu _OptionErroru_processoptionsu _setoptionu _getactionu _getcategoryuwarnu warn_explicituobjectuWarningMessageucatch_warningsu_warnings_defaultsu _warningsufiltersu_defaultactionu _onceregistryu defaultactionu onceregistryuTrueu ImportErroru warnoptionsu ImportWarninguPendingDeprecationWarningusilenceuappenduDeprecationWarninguclsuflagsu bytes_warningu bytes_actionu BytesWarninguhasattruresource_actionuResourceWarning(((u-/opt/alt/python33/lib64/python3.3/warnings.pyus^          )DE(