grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026î   fß7ã@s€dZddlZddddddd d gZddd d„Zdd d„Zd ed dddd„Zedddd„Zdd „ZGdd„de ƒZ dd„Z dd„Z dd„Z dd„Zdddd„Zddddd„ZGdd „d eƒZGd!d „d eƒZdZyDdd"lmZmZmZmZmZmZeZeZd#ZWn6ek r¨gZd$ZiZdad%d&„ZYnXe ejƒesyee gZ!e!j"e#ƒxe!D]Z$ed'd(e$ƒqÜWej%j&Z&e&dkrd)Z'ne&r&d$Z'nd'Z'ee'd(e(d*dƒe)ed+ƒrZd,Z*nd'Z*ee*d(e+d*dƒn[dS)-z&Python part of the warnings subsystem.éNÚwarnÚ warn_explicitÚ showwarningÚ formatwarningÚfilterwarningsÚ simplefilterÚ resetwarningsÚcatch_warningsc Csd|dkr(tj}|dkr(dSny#|jt|||||ƒƒWntk r_YnXdS)z7Hook to write a warning to a file; replace if you like.N)ÚsysÚstderrÚwriterÚOSError)ÚmessageÚcategoryÚfilenameÚlinenoÚfileÚline©rú-/opt/alt/python34/lib64/python3.4/warnings.pyr s   # cCspddl}d|||j|f}|dkrC|j||ƒn|}|rl|jƒ}|d|7}n|S)z.Function to format a warning the standard way.rNz%s:%s: %s: %s z %s )Ú linecacheÚ__name__ÚgetlineÚstrip)rrrrrrÚsrrrrs $ ÚFcCsjddl}||j||jƒ||j|ƒ|f}|rOtj|ƒntjd|ƒtƒdS)aÖ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 rN)ÚreÚcompileÚIÚfiltersÚappendÚinsertÚ_filters_mutated)ÚactionrrÚmodulerr rÚitemrrrr s cCsF|d|d|f}|r+tj|ƒntjd|ƒtƒdS)a�Insert 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 Nr)rr r!r")r#rrr r%rrrr=s cCsgtdd…ks z_setoption..ú$zinvalid lineno %r) rÚsplitÚlenr&r Ú _getactionÚescapeÚ _getcategoryÚintÚ ValueErrorÚ OverflowErrorr)r-rÚpartsr#rrr$rrrrr*ds.        r*cCsU|s dS|dkrdSx!d D]}|j|ƒr!|Sq!Wtd|fƒ‚dS) NÚdefaultÚallÚalwaysÚignorer$ÚonceÚerrorzinvalid action: %r)zdefaultzalwayszignorezmodulezoncezerror)Ú startswithr&)r#Úarrrr7s  r7cCs>ddl}|stS|jd|ƒrcyt|ƒ}Wqtk r_td|fƒ‚YqXn²|jdƒ}|d|…}||dd…}yt|dd|gƒ}Wn%tk rÙtd|fƒ‚YnXyt ||ƒ}Wn%t k rtd|fƒ‚YnXt |tƒs:td|fƒ‚n|S)Nrz^[a-zA-Z0-9_]+$zunknown warning category: %rÚ.ézinvalid module name: %rzinvalid warning category: %r) rÚWarningÚmatchÚevalÚ NameErrorr&ÚrfindÚ __import__Ú ImportErrorÚgetattrÚAttributeErrorÚ issubclass)rrÚcatÚir$ÚklassÚmrrrr9‰s,    r9rGc 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|dkrytj d }Wqtk rd}YqXn|s(|}n|jd iƒ} t|||||| |ƒdS) z:Issue a warning, or maybe ignore it or raise an exception.NrGrzÚ__file__ú.pycú.pyoÚ__main__rZ__warningregistry__)rWrXéÿÿÿÿ)Ú isinstancerHÚ __class__Ú UserWarningr Ú _getframer;Ú__dict__Ú f_globalsÚf_linenoÚgetÚlowerÚendswithÚargvrPÚ setdefaultr) rrÚ stacklevelZcallerÚglobalsrr$rZfnlÚregistryrrrr¤s:              cCsÄt|ƒ}|dkrV|p!d}|dd…jƒdkrV|dd…}qVn|dkrki}n|jddƒtkrš|jƒt|déz.pyÚversionrrArGrCrBr@r$r>z1Unrecognized action (%r) in warnings.filters: %sz:warnings.showwarning() must be set to a function or methodéýÿÿÿrl)r:rcrbÚ_filters_versionÚclearr[rHÚstrr\rrIrQÚ defaultactionrÚgetlinesÚ onceregistryÚ RuntimeErrorÚcallablerÚ TypeError)rrrrr$riÚmodule_globalsÚtextÚkeyr%r#r.rRÚmodÚlnrZoncekeyZaltkeyrrrrÌsn                           c@s:eZdZdZd Zddd d „Zd d „ZdS)ÚWarningMessagez0Holds the result of a single showwarning() call.rrrrrrNc CsMtƒ}x%|jD]}t||||ƒqW|r@|jnd|_dS)N)ÚlocalsÚ_WARNING_DETAILSÚsetattrrÚ_category_name) ÚselfrrrrrrÚ local_valuesÚattrrrrÚ__init__s zWarningMessage.__init__cCs&d|j|j|j|j|jfS)NzD{message : %r, category : %r, filename : %r, lineno : %s, line : %r})rrrrr)r€rrrÚ__str__#s zWarningMessage.__str__)zmessagezcategoryzfilenamezlinenozfilezline)rr'r(r)r}rƒr„rrrrr{s r{c@sReZdZdZdddddd„Zdd „Zd d „Zd d „ZdS)r a�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. ÚrecordFr$NcCs8||_|dkr"tjdn||_d|_dS)zê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. NÚwarningsF)Ú_recordr ÚmodulesÚ_moduleÚ_entered)r€r…r$rrrrƒ:s "zcatch_warnings.__init__cCsrg}|jr|jdƒn|jtjdk rL|jd|jƒnt|ƒj}d|dj|ƒfS)Nz record=Truer†z module=%rz%s(%s)z, )r‡r r‰r rˆÚtyperÚjoin)r€r,ÚnamerrrÚ__repr__Fs zcatch_warnings.__repr__cs¢|jrtd|ƒ‚nd|_|jj|_|jdd…|j_|jjƒ|jj|_|jršg‰‡fdd†}||j_ˆSdSdS)NzCannot enter %r twiceTcsˆjt||ŽƒdS)N)r r{)r,Úkwargs)ÚlogrrrYsz-catch_warnings.__enter__..showwarning) rŠrsr‰rÚ_filtersr"rÚ _showwarningr‡)r€rr)r�rÚ __enter__Os     zcatch_warnings.__enter__cGsK|jstd|ƒ‚n|j|j_|jjƒ|j|j_dS)Nz%Cannot exit %r without entering first)rŠrsr‘r‰rr"r’r)r€Úexc_inforrrÚ__exit__`s   zcatch_warnings.__exit__)rr'r(r)rƒrŽr“r•rrrrr )s  )rÚ_defaultactionÚ _onceregistryrrr"Tr>cCstd7adS)NrG)rmrrrrr"sr"rArrCr Úgettotalrefcountr@),r)r Ú__all__rrrHrrrÚ Exceptionr&r/r*r7r9rrÚobjectr{r Z_warnings_defaultsÚ _warningsrr–r—r"rprrrNrmÚ warnoptionsÚ ImportWarningÚPendingDeprecationWarningZsilencer ÚDeprecationWarningÚclsÚflagsÚ bytes_warningZ bytes_actionÚ BytesWarningÚhasattrZresource_actionÚResourceWarningrrrrÚsb          )HG.