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 $ ÚFcCsddl}|dks+td |fƒ‚t|tƒsFtd ƒ‚t|tƒsatd ƒ‚t|tƒs|td ƒ‚t|tƒs—td ƒ‚t|tƒr²|dks¾tdƒ‚||j||j ƒ||j|ƒ|f}|rt j |ƒnt j d|ƒ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ÚerrorÚignoreÚalwaysÚdefaultÚmoduleÚoncezinvalid action: %rzmessage must be a stringzcategory must be a classz#category must be a Warning subclasszmodule must be a stringzlineno must be an int >= 0)zerrorzignorezalwayszdefaultzmodulezonce)ÚreÚAssertionErrorÚ isinstanceÚstrÚtypeÚ issubclassÚWarningÚintÚcompileÚIÚfiltersÚappendÚinsertÚ_filters_mutated)Úactionrrr rr-r"Úitemrrrr s  cCsŒ|d kstd|fƒ‚t|tƒr:|dksFtd ƒ‚|d |d |f}|rqtj|ƒntjd|ƒtƒd S) 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 rrrrr r!zinvalid action: %rrzlineno must be an int >= 0N)zerrorzignorezalwayszdefaultzmodulezonce)r#r$r)r,r-r.r/)r0rrr-r1rrrr=s  cCsgtdd…ks z_setoption..ú$zinvalid lineno %r) r"ÚsplitÚlenr2r-Ú _getactionÚescapeÚ _getcategoryr)Ú ValueErrorÚ OverflowErrorr)r9r"Úpartsr0rrr rrrrr6ds.        r6cCsU|s dS|dkrdSx!d D]}|j|ƒr!|Sq!Wtd|fƒ‚dS) NrÚallrrr r!rzinvalid action: %r)zdefaultzalwayszignorezmodulezoncezerror)Ú startswithr2)r0ÚarrrrCs  rCcCs>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"r(ÚmatchÚevalÚ NameErrorr2ÚrfindÚ __import__Ú ImportErrorÚgetattrÚAttributeErrorr')rr"ÚcatÚir ÚklassÚmrrrrE‰s,    rErMc Csot|tƒr|j}n|dkr0t}nt|tƒsEt‚ytj|ƒ}Wn!tk r{tj }d}YnX|j }|j }d|kr§|d}nd}|j dƒ}|ró|j ƒ}|jd ƒr=|dd …}q=nJ|dkr.ytjd }Wq.tk r*d}Yq.Xn|s=|}n|jd iƒ} t|||||| |ƒdS) z:Issue a warning, or maybe ignore it or raise an exception.NrMrzÚ__file__ú.pycú.pyoÚ__main__rZ__warningregistry__)r[r\éÿÿÿÿ)r$r(Ú __class__Ú UserWarningr'r#r Ú _getframerFÚ__dict__Ú f_globalsÚf_linenoÚgetÚlowerÚendswithÚargvrUÚ 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ÚversionrrrMrr!rr rz1Unrecognized action (%r) in warnings.filters: %sz:warnings.showwarning() must be set to a function or methodéýÿÿÿro)r)rfreÚ_filters_versionÚclearr$r(r%r_r,rNr'Ú defaultactionrÚgetlinesÚ onceregistryÚ RuntimeErrorÚcallablerÚ TypeError)rrrrr rlÚmodule_globalsÚtextÚkeyr1r0r:rVÚ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})rr�rrr)r‚rrrÚ__str__#s zWarningMessage.__str__)zmessagezcategoryzfilenamezlinenozfilezline)rr3r4r5rr…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Šr&rÚjoin)r‚r8Ú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})r8Úkwargs)ÚlogrrrYsz-catch_warnings.__enter__..showwarning) rŒrur‹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Œrur’r‹r,r/r“r)r‚Úexc_inforrrÚ__exit__`s   zcatch_warnings.__exit__)rr3r4r5r…r�r”r–rrrrr )s  )r,Ú_defaultactionÚ _onceregistryrrr/TrcCstd7adS)NrM)rprrrrr/sr/rrrr-Úgettotalrefcountr),r5r Ú__all__rrr(rrrÚ Exceptionr2r;r6rCrErrÚobjectr}r Z_warnings_defaultsÚ _warningsr,r—r˜r/rrrtrSrpÚ warnoptionsÚ ImportWarningÚPendingDeprecationWarningZsilencer-ÚDeprecationWarningÚclsÚflagsÚ bytes_warningZ bytes_actionÚ BytesWarningÚhasattrZresource_actionÚResourceWarningrrrrÚsb          )HG.