grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026U iÛfèLã@sÚdZddlZddddddd d gZdd+d„Zd?d,d„ZGd-d.„d.eƒZGd/d „d eƒZd0d1„Zz0dd2lmZm Z m!Z!mZmZm"Z"e Z#e!Z$d3Z%Wn2e&k �rngZd4Z#iZ$d*a'd5d6„Z"dZ%YnXeej(ƒe%�sÔe)ed7ƒ�sÔe d4e*d8d*d9�e d:e*d*d;�e d:e+d*d;�e d:e,d*d;�e d:e-d*d;�[%dS)@z&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/python38/lib64/python3.8/warnings.pyr scCst||||d|ƒ}t|ƒS)ú.Function to format a warning the standard way.N)r Ú_formatwarnmsg_impl)r rrrrrrrrrscCsP|j}|dkr tj}|dkr dSt|ƒ}z| |¡Wntk rJYnXdS©N)rÚsysÚstderrÚ_formatwarnmsgÚwriteÚOSError)rrÚtextrrrr sr c Csœ|jj}|j›d|j›d|›d|j›d�}|jdkrpzddl}| |j|j¡}Wqvtk rld}d}YqvXn|j}|rŽ|  ¡}|d|7}|j dk �r˜z ddl }Wntk rÂd}d}Yn4X|  ¡}z|  |j ¡}Wntk rôd}YnX|dk �r„|d7}|D]t}|d|j|jf7}z$|dk �rB| |j|j¡}nd}Wntk �rbd}YnX|�r |  ¡}|d |7}�q n|�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#sT"         ÿ  rcCsdzt}Wntk rYn= 0N©Úappend) ÚAssertionErrorÚ isinstanceÚstrÚtypeÚ issubclassÚWarningÚintÚreÚcompileÚIÚ _add_filter)Úactionr rr<rrArIrrrr‚s& ÿÿ cCsH|dkstd|fƒ‚t|tƒr(|dks0tdƒ‚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@)rBrCrHrL)rMrrrArrrr¥s ÿÿcGsR|s6zt |¡Wntk r&YnXt d|¡n|tkrHt |¡tƒdS)Nr)ÚfiltersÚremoveÚ ValueErrorÚinsertrAÚ_filters_mutated)rAÚitemrrrrLµs rLcCsgtdd…<tƒdS)zAClear the list of warning filters, so that no filters are active.N)rNrRrrrrrÃs c@seZdZdZdS)Ú _OptionErrorz,Exception used by option processing helpers.N)r!Ú __module__Ú __qualname__Ú__doc__rrrrrTÈsrTc CsN|D]D}z t|ƒWqtk rF}ztd|tjd�W5d}~XYqXqdS)NzInvalid -W option ignored:)r)Ú _setoptionrTÚprintrr)ÚargsÚargrrrrÚ_processoptionsÍs  r\c Csô| d¡}t|ƒdkr$td|fƒ‚t|ƒdkr<| d¡q$dd„|Dƒ\}}}}}t|ƒ}t|ƒ}|sl|rtddl}|r‚| |¡}|r”| |¡d}|rÜzt|ƒ}|dkr®t ‚Wqàt t fk rØtd |fƒd‚YqàXnd}t |||||ƒdS) Nréztoo many fields (max 5): %rr6cSsg|] }| ¡‘qSr)r%)Ú.0r*rrrÚ Ûsÿz_setoption..rz\Zzinvalid lineno %r) ÚsplitÚlenrTrAÚ _getactionÚ _getcategoryrIÚescaperHrPÚ OverflowErrorr)r[ÚpartsrMr rr<rrIrrrrXÕs2    ÿ rXcCsB|sdS|dkrdSdD]}| |¡r|Sqtd|fƒ‚dS)Nr;Úallr:)r;r:r9r<r=r8r>)Ú startswithrT)rMÚarrrrbñs  rbcCs¸|stSd|krddl}|}nJ| d¡\}}}zt|dd|gƒ}Wn$tk rftd|fƒd‚YnXzt||ƒ}Wn$tk rštd|fƒd‚YnXt|tƒs´td|fƒ‚|S)NÚ.rzinvalid module name: %rzunknown warning category: %rzinvalid warning category: %r) rGÚbuiltinsÚ rpartitionÚ __import__Ú ImportErrorrTÚgetattrÚAttributeErrorrF)rÚmÚklassr<Ú_Úcatrrrrcûs" rccCs|jj}d|kod|kS)zFSignal whether the frame is an internal CPython implementation detail.Ú importlibÚ _bootstrap)Úf_codeÚ co_filename)r-rrrrÚ_is_internal_framesrycCs"|j}|dk rt|ƒr|j}q|S)z;Find the next frame that doesn't involve CPython internals.N)Úf_backry)r-rrrÚ_next_external_framesr{éc Cst|tƒr|j}|dkrt}t|tƒr0t|tƒsDtd t|ƒj¡ƒ‚zV|dks\t t   d¡ƒrht   |¡}n0t   d¡}t |dƒD]}t |ƒ}|dkr~t‚q~Wn"tk r¼t j}d}d}YnX|j}|jj}|j}d|krä|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__)rCrGÚ __class__Ú UserWarningrErFr1Úformatr!ryrÚ _getframeÚranger{rPÚ__dict__Ú f_globalsrwrxÚf_linenoÚ setdefaultr) r rÚ stacklevelr&r-ÚxÚglobalsrrr<Úregistryrrrrs> ÿ      ÿcCsèt|ƒ}|dkr8|pd}|dd… ¡dkr8|dd…}|dkrDi}| dd¡tkrd| ¡t|d<t|tƒr~t|ƒ}|j}n |}||ƒ}|||f} | | ¡r¢dSt D]V} | \} } } }}| dksÊ|   |¡r¦t || ƒr¦|dksæ|  |¡r¦|dksö||kr¦�qq¦t } | dk�rdSddl }| ||¡| dk�r2|‚| dk�rfd || <||f}t |¡�r\dSd t|<nf| d k�rrnZ| d k�r¨d || <||df}| |¡�rždSd ||<n$| d k�r¼d || <ntd | | fƒ‚t|||||ƒ} t| ƒdS)Nz éýÿÿÿz.pyÚversionrr9r8r=r|r:r<r;z1Unrecognized action (%r) in warnings.filters: %s)rHÚlowerÚgetÚ_filters_versionÚclearrCrGrDr}rNÚmatchrFÚ defaultactionr"ÚgetlinesÚ onceregistryÚ RuntimeErrorr r3)r rrrr<r‰Úmodule_globalsr&rÚkeyrSrMrrtÚmodZlnr"ZoncekeyZaltkeyrrrrGs|    ÿþþýý             ÿÿc@s"eZdZdZddd„Zdd„ZdS)r )r rrrrrr&NcCs>||_||_||_||_||_||_||_|r4|jnd|_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!rUrVÚ_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(||_|dkrtjdn||_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šµszcatch_warnings.__init__cCsPg}|jr| d¡|jtjdk r4| d|j¡t|ƒj}d|d |¡fS)Nz record=Trueržz module=%rz%s(%s)z, )rŸrAr¡rr rEr!Újoin)r™rZÚnamerrrÚ__repr__Ás  zcatch_warnings.__repr__cCs~|jrtd|ƒ‚d|_|jj|_|jdd…|j_|j ¡|jj|_|jj|_|j rvg}|j |j_|jj |j_|SdSdS)NzCannot enter %r twiceT) r¢r”r¡rNÚ_filtersrRrÚ _showwarningr rŸrAr/)r™ÚlogrrrÚ __enter__Ês       zcatch_warnings.__enter__cGs>|jstd|ƒ‚|j|j_|j ¡|j|j_|j|j_dS)Nz%Cannot exit %r without entering first) r¢r”r¦r¡rNrRr§rr )r™Úexc_inforrrÚ__exit__Ýs     zcatch_warnings.__exit__)r!rUrVrWršr¥r©r«rrrrr ¤s   cszdˆj›d�g}ˆjdk rVddl‰ddl}‡‡fdd„}| d¡|| t|ƒƒ¡7}d |¡ d¡}t |t d ˆd �dS) Nz coroutine 'z' was never awaited rc3s4tˆjƒD]$\}}}ˆ ||¡}||||fVq dSr)ÚreversedÚ cr_originr#)rrÚfuncnamer©Úcoror"rrÚextractís z*_warn_unawaited_coroutine..extractz-Coroutine created at (most recent call last) r6r é)rr†r&) rVr­r"Ú tracebackrAÚ format_listÚlistr£ÚrstriprÚRuntimeWarning)r°Ú msg_linesr³r±rrr¯rÚ_warn_unawaited_coroutineçs ÿ  r¹)rNÚ_defaultactionÚ _onceregistryrrrRTr;cCs td7adS)Nr|)rŽrrrrrRsrRZgettotalrefcountÚ__main__)rr<rAr9)rrA)NN)N)Nr|N)NNNN).rWrÚ__all__rrr rr/r3r4rrGrrrLrr$rTr\rXrbrcryr{rrÚobjectr r r¹Ú _warningsrNrºr»rRr‘r“Z_warnings_defaultsrnrŽÚ warnoptionsÚhasattrÚDeprecationWarningÚPendingDeprecationWarningÚ ImportWarningÚResourceWarningrrrrÚs|þ  ; ÿ #  )þ GC    ÿ