grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jèLã@sÊdZddlZgd¢Zd=dd„Zd>dd„Zdd „Zd d „ZeZd d „ZeZ dd„Z de dddfdd„Z e ddfdd„Z dd„Zdd„ZGdd„deƒZdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd?d)d*„Z  d@d+d,„ZGd-d.„d.eƒZGd/d0„d0eƒZd1d2„Zzdd3lmZm Z m!Z!mZmZm"Z"e Z#e!Z$d4Z%Wne&y±gZd5Z#iZ$d(a'd6d7„Z"dZ%Ynweej(ƒe%sâe)ed8ƒsâe d5e*d9d(d:�e d;e*d(d<�e d;e+d(d<�e d;e,d(d<�e d;e-d(d<�[%dS)Az&Python part of the warnings subsystem.éN)ÚwarnÚ warn_explicitÚ showwarningÚ formatwarningÚfilterwarningsÚ simplefilterÚ resetwarningsÚcatch_warningscCst||||||ƒ}t|ƒdS)ú7Hook to write a warning to a file; replace if you like.N)ÚWarningMessageÚ_showwarnmsg_impl)ÚmessageÚcategoryÚfilenameÚlinenoÚfileÚlineÚmsg©rú//opt/alt/python310/lib64/python3.10/warnings.pyr s rcCst||||d|ƒ}t|ƒS)ú.Function to format a warning the standard way.N)r Ú_formatwarnmsg_impl)r rrrrrrrrrsrcCsN|j}|durtj}|durdSt|ƒ}z| |¡WdSty&YdSw©N)rÚsysÚstderrÚ_formatwarnmsgÚwriteÚOSError)rrÚtextrrrr s þr c Cs†|jj}|j›d|j›d|›d|j›d�}|jdur6zddl}| |j|j¡}Wnty5d}d}Ynw|j}|rE|  ¡}|d|7}|j durÁzddl }Wn ty]d}d}Ynw|  ¡}z|  |j ¡}Wn tyud}Ynw|dur¸|d7}|D]5}|d|j|jf7}z|durš| |j|j¡}nd}Wn ty¨d}Ynw|rµ|  ¡}|d |7}q€|S|sÁ||›d �7}|S) Nú:z: Ú rz %s Tz-Object allocated at (most recent call last): z File "%s", lineno %s z %s z<: Enable tracemalloc to get the object allocation traceback )rÚ__name__rrr rÚ linecacheÚgetlineÚ ExceptionÚstripÚsourceÚ tracemallocÚ is_tracingÚget_object_traceback) rrÚsr"rr'ÚtracingÚtbÚframerrrr#sb"  ü    ý ý ÿ€ ÿ €ýrcCsbzt}Wn ty Ynw|tur+t|ƒstdƒ‚||j|j|j|j|j |j ƒdSt |ƒdS)r z:warnings.showwarning() must be set to a function or methodN) rÚ NameErrorÚ_showwarning_origÚcallableÚ TypeErrorr rrrrrr )rÚswrrrÚ _showwarnmsg`s ÿÿ r3cCsLzt}Wn tyYt|ƒSw|tur"||j|j|j|j|jƒSt|ƒS)r) rr.Ú_formatwarning_origr rrrrr)rÚfwrrrrus ù  ÿrÚFcCsÌ|dvs Jd|fƒ‚t|tƒsJdƒ‚t|tƒsJdƒ‚t|tƒs&Jdƒ‚t|tƒs/Jdƒ‚t|tƒr8|dks= 0N©Úappend) Ú isinstanceÚstrÚtypeÚ issubclassÚWarningÚintÚreÚcompileÚIÚ _add_filter)Úactionr rr<rrArHrrrr‚s& ÿÿ rcCsH|dvs Jd|fƒ‚t|tƒr|dksJdƒ‚t|d|d||d�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 r7r>rr?Nr@)rBrGrK)rLrrrArrrr¥s ÿÿrcGsP|szt |¡Wn tyYnwt d|¡n |tvr#t |¡tƒdS)Nr)ÚfiltersÚremoveÚ ValueErrorÚinsertrAÚ_filters_mutated)rAÚitemrrrrKµs ÿ  rKcCsgtdd…<tƒdS)zAClear the list of warning filters, so that no filters are active.N)rMrQrrrrrÃs  rc@seZdZdZdS)Ú _OptionErrorz,Exception used by option processing helpers.N)r!Ú __module__Ú __qualname__Ú__doc__rrrrrSÈsrSc CsN|D]"}zt|ƒWqty$}ztd|tjd�WYd}~qd}~wwdS)NzInvalid -W option ignored:)r)Ú _setoptionrSÚprintrr)ÚargsÚargrrrrÚ_processoptionsÍs €ÿýr[c Csö| d¡}t|ƒdkrtd|fƒ‚t|ƒdkr#| d¡t|ƒdksdd„|Dƒ\}}}}}t|ƒ}t|ƒ}|s;|r?ddl}|rF| |¡}|rO| |¡d}|roz t|ƒ}|dkr\t ‚Wnt t fyntd |fƒd‚wd}t |||||ƒdS) Nréztoo many fields (max 5): %rr6cSsg|]}| ¡‘qSr)r%)Ú.0r*rrrÚ Ûs ÿz_setoption..rz\Zzinvalid lineno %r) ÚsplitÚlenrSrAÚ _getactionÚ _getcategoryrHÚescaperGrOÚ OverflowErrorr)rZÚpartsrLr rr<rrHrrrrWÕs8     ÿÿ ÿÿrWcCs>|sdS|dkr dSdD] }| |¡r|Sq td|fƒ‚)Nr;Úallr:)r;r:r9r<r=r8r>)Ú startswithrS)rLÚarrrrañs  ÿracCs¬|stSd|vrddl}|}n"| d¡\}}}z t|dd|gƒ}Wnty0td|fƒd‚wzt||ƒ}WntyGtd|fƒd‚wt|tƒsTtd|fƒ‚|S)NÚ.rzinvalid module name: %rzunknown warning category: %rzinvalid warning category: %r) rFÚbuiltinsÚ rpartitionÚ __import__Ú ImportErrorrSÚgetattrÚAttributeErrorrE)rÚmÚklassr<Ú_Úcatrrrrbûs& ÿ ÿ rbcCs|jj}d|vo d|vS)zFSignal whether the frame is an internal CPython implementation detail.Ú importlibÚ _bootstrap)Úf_codeÚ co_filename)r-rrrrÚ_is_internal_framesrxcCs0|j}|durt|ƒr|j}|durt|ƒs |S)z;Find the next frame that doesn't involve CPython internals.N)Úf_backrx)r-rrrÚ_next_external_frames ÿrzéc Cs t|tƒr|j}|durt}t|tƒrt|tƒs"td t|ƒj¡ƒ‚z+|dks.t t   d¡ƒr4t   |¡}nt   d¡}t |dƒD] }t |ƒ}|durKt‚q?Wnty]t j}d}d}Yn w|j}|jj}|j}d|vrq|d} nd} | di¡} t||||| | ||ƒdS)z:Issue a warning, or maybe ignore it or raise an exception.Nz/category must be a Warning subclass, not '{:s}'r{rr!zZ__warningregistry__)rBrFÚ __class__Ú UserWarningrDrEr1Úformatr!rxrÚ _getframeÚrangerzrOÚ__dict__Ú f_globalsrvrwÚf_linenoÚ setdefaultr) r rÚ stacklevelr&r-ÚxÚglobalsrrr<ÚregistryrrrrsB  ÿ  ÿ€ ý  ÿrcCsÖt|ƒ}|dur|p d}|dd… ¡dkr|dd…}|dur"i}| dd¡tkr2| ¡t|d<t|tƒr?t|ƒ}|j}n|}||ƒ}|||f} | | ¡rQdSt D]*} | \} } } }}| duse|   |¡r}t || ƒr}|duss|  |¡r}|dks{||kr}nqSt } | dkr†dSddl }| ||¡| dkr–|‚| dkr®d || <||f}t |¡r©dSd t|<n/| d kr³n*| d krÌd || <||df}| |¡rÇdSd ||<n| d krÕd || <ntd | | fƒ‚t|||||ƒ} t| ƒdS)Nz éýÿÿÿz.pyÚversionrr9r8r=r{r:r<r;z1Unrecognized action (%r) in warnings.filters: %s)rGÚlowerÚgetÚ_filters_versionÚclearrBrFrCr|rMÚmatchrEÚ defaultactionr"ÚgetlinesÚ onceregistryÚ RuntimeErrorr r3)r rrrr<rˆÚmodule_globalsr&rÚkeyrRrLrrsÚmodZlnr"ZoncekeyZaltkeyrrrrGsr    ÿ€       ÿÿ rc@s&eZdZdZ  ddd„Zdd„ZdS)r )r rrrrrr&NcCsD||_||_||_||_||_||_||_|r|j|_dSd|_dSr) r rrrrrr&r!Ú_category_name)Úselfr rrrrrr&rrrÚ__init__“szWarningMessage.__init__cCsd|j|j|j|j|jfS)NzD{message : %r, category : %r, filename : %r, lineno : %s, line : %r})r r—rrr)r˜rrrÚ__str__žs  ÿÿzWarningMessage.__str__)NNN)r!rTrUÚ_WARNING_DETAILSr™ršrrrrr Žs  ÿ r c@s8eZdZdZdddœdd„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. FN)Úrecordr<cCs(||_|dur 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__cCsPg}|jr | d¡|jtjdur| d|j¡t|ƒj}d|d |¡fS)Nz record=Truer�z module=%rz%s(%s)z, )ržrAr rrŸrDr!Újoin)r˜rYÚnamerrrÚ__repr__Ás  zcatch_warnings.__repr__cCsz|jr td|ƒ‚d|_|jj|_|jdd…|j_|j ¡|jj|_|jj|_|j r;g}|j |j_|jj |j_|SdS)NzCannot enter %r twiceT) r¡r“r rMÚ_filtersrQrÚ _showwarningr ržrAr/)r˜ÚlogrrrÚ __enter__Ês       zcatch_warnings.__enter__cGs>|js td|ƒ‚|j|j_|j ¡|j|j_|j|j_dS)Nz%Cannot exit %r without entering first) r¡r“r¥r rMrQr¦rr )r˜Úexc_inforrrÚ__exit__Ýs     zcatch_warnings.__exit__)r!rTrUrVr™r¤r¨rªrrrrr ¤s   r cszdˆj›d�g}ˆjdur+ddl‰ddl}‡‡fdd„}| d¡|| t|ƒƒ¡7}d |¡ d¡}t |t d ˆd �dS) Nz coroutine 'z' was never awaited rc3s6�tˆjƒD]\}}}ˆ ||¡}||||fVqdSr)ÚreversedÚ cr_originr#)rrÚfuncnamer©Úcoror"rrÚextractís € þz*_warn_unawaited_coroutine..extractz-Coroutine created at (most recent call last) r6r é)rr…r&) rUr¬r"Ú tracebackrAÚ format_listÚlistr¢ÚrstriprÚRuntimeWarning)r¯Ú msg_linesr²r°rrr®rÚ_warn_unawaited_coroutineçs ÿ  r¸)rMÚ_defaultactionÚ _onceregistryrrrQTr;cCs td7adS)Nr{)r�rrrrrQs rQZgettotalrefcountÚ__main__)rr<rAr9)rrA)NNr)Nr{N)NNNN).rVrÚ__all__rrr rr/r3r4rrFrrrKrr$rSr[rWrarbrxrzrrÚobjectr r r¸Ú _warningsrMr¹rºrQr�r’Z_warnings_defaultsrmr�Ú warnoptionsÚhasattrÚDeprecationWarningÚPendingDeprecationWarningÚ ImportWarningÚResourceWarningrrrrÚsn  ;  ÿ#  ) þGC  õ  ÿ