grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B (¬nz»xã@sÚdZddlZddddddd d gZdd+d„Zd?d,d„ZGd-d.„d.eƒZGd/d „d eƒZd0d1„Zy0dd2lmZm 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)z7Hook 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/python37/lib64/python3.7/warnings.pyr scCst||||d|ƒ}t|ƒS)z.Function to format a warning the standard way.N)r Ú_formatwarnmsg_impl)r r rrrrrrrrscCsP|j}|dkr tj}|dkr dSt|ƒ}y| |¡Wntk rJYnXdS)N)rÚsysÚstderrÚ_formatwarnmsgÚwriteÚOSError)rrÚtextrrrr sr c Cs |jj}|j›d|j›d|›d|j›d�}|jdkrpyddl}| |j|j¡}Wqvtk rld}d}YqvXn|j}|rŽ|  ¡}|d|7}|j dk �rœy ddl }Wntk rÂd}d}Yn4X|  ¡}y|  |j ¡}Wntk rôd}YnX|dk �rˆ|d7}x’|D]t}|d|j|jf7}y$|dk �rD| |j|j¡}nd}Wntk �rdd}YnX|�r|  ¡}|d |7}�qWn|�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 Úsrrr$ÚtracingÚtbÚframerrrr#sR"           rcCsdyt}Wntk rYn| d¡q&Wdd„|Dƒ\}}}}}t|ƒ}t|ƒ}|sp|rxddl}|r†| |¡}|r˜| |¡d}|ràyt|ƒ}|dkr²t ‚Wqät t fk rÜtd |fƒd‚YqäXnd}t |||||ƒdS) Nréztoo many fields (max 5): %rr3cSsg|] }| ¡‘qSr)r")Ú.0r'rrrú Ûsz_setoption..rz\Zzinvalid lineno %r) ÚsplitÚlenrAr4Ú _getactionÚ _getcategoryr5ÚescapeÚintr=Ú OverflowErrorr)rHÚpartsr9r r r:rr5rrrrEÕs0   rEcCsB|sdS|dkrdSxdD]}| |¡r|SqWtd|fƒ‚dS)NÚdefaultÚallÚalways)rUrWÚignorer:ÚonceÚerrorzinvalid action: %r)Ú startswithrA)r9ÚarrrrOñs  rOcCs¸|stSd|krddl}|}nJ| d¡\}}}yt|dd|gƒ}Wn$tk rftd|fƒd‚YnXyt||ƒ}Wn$tk rštd|fƒd‚YnXt|tƒs´td|fƒ‚|S)NÚ.rzinvalid module name: %rzunknown warning category: %rzinvalid warning category: %r) ÚWarningÚbuiltinsÚ rpartitionÚ __import__Ú ImportErrorrAÚgetattrÚAttributeErrorÚ issubclass)r ÚmÚklassr:Ú_ÚcatrrrrPûs" rPcCs|jj}d|kod|kS)zFSignal whether the frame is an internal CPython implementation detail.Ú importlibÚ _bootstrap)Úf_codeÚ co_filename)r*rrrrÚ_is_internal_framesrncCs&|j}x|dk r t|ƒr |j}qW|S)z;Find the next frame that doesn't involve CPython internals.N)Úf_backrn)r*rrrÚ_next_external_frames rpéc Csvt|tƒr|j}|dkrt}t|tƒr0t|tƒsDtd t|ƒj¡ƒ‚yZ|dks\t t   d¡ƒrht   |¡}n4t   d¡}x(t |dƒD]}t |ƒ}|dkr€t‚q€WWntk r¼t j}d}YnX|j}|j}d|krÜ|d}nd}| d¡} | �r|  ¡} |  d¡�rP| dd…} n>|d k�rFyt jd } Wntk �rDd } YnX| �sP|} | d i¡} t||| ||| ||ƒdS) z:Issue a warning, or maybe ignore it or raise an exception.Nz/category must be a Warning subclass, not '{:s}'rqrzÚ__file__z.pycéÿÿÿÿÚ__main__rZ__warningregistry__)Ú isinstancer^Ú __class__Ú UserWarningÚtyperer.ÚformatrrnrÚ _getframeÚrangerpr=Ú__dict__Ú f_globalsÚf_linenoÚgetÚlowerÚendswithÚargvrdÚ setdefaultr) r r Ú stacklevelr#r*ÚxÚglobalsrr:rZfnlÚregistryrrrrsL           cCsèt|ƒ}|dkr8|pd}|dd… ¡dkr8|dd…}|dkrDi}| dd¡tkrd| ¡t|d<t|tƒr~t|ƒ}|j}n |}||ƒ}|||f} | | ¡r¢dSx^t D]R} | \} } } }}| dksÌ|   |¡r¨t || ƒr¨|dksè|  |¡r¨|dksø||kr¨Pq¨Wt } | 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ÚversionrrXrZrYrqrWr:rUz1Unrecognized action (%r) in warnings.filters: %s)rRr€rÚ_filters_versionÚclearrur^Ústrrvr;ÚmatchreÚ defaultactionrÚgetlinesÚ onceregistryÚ RuntimeErrorr r0)r r rrr:r‡Úmodule_globalsr#rÚkeyr@r9rriÚmodZlnrZoncekeyZaltkeyrrrrSsj                    c@s"eZdZdZddd„Zdd„ZdS)r )r r rrrrr#NcCs>||_||_||_||_||_||_||_|r4|jnd|_dS)N) r r rrrrr#rÚ_category_name)Úselfr r rrrrr#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__ªszWarningMessage.__str__)NNN)rrBrCÚ_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œr4ržrr�rxrÚjoin)r–rGÚ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žr;Ú_filtersr?rÚ _showwarningr rœr4r,)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žr;r?r¤rr )r–Úexc_inforrrÚ__exit__és     zcatch_warnings.__exit__)rrBrCrDr—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 rc3s8x2tˆjƒD]$\}}}ˆ ||¡}||||fVq WdS)N)ÚreversedÚ cr_originr )rrÚfuncnamer)ÚcororrrÚextractùs z*_warn_unawaited_coroutine..extractz-Coroutine created at (most recent call last) r3ré)r r„r#) rCrªrÚ tracebackr4Ú format_listÚlistr ÚrstriprÚRuntimeWarning)r¬Ú msg_linesr¯r­rr)r¬rrÚ_warn_unawaited_coroutineós  rµ)r;Ú_defaultactionÚ _onceregistryrrr?TrUcCs td7adS)Nrq)rŠrrrrr?sr?Zgettotalrefcountrt)r r:r4rX)r r4)NN)N)NrqN)NNNN).rDrÚ__all__rrr rr,r0r1rr^rrr8rr!rArIrErOrPrnrprrÚobjectr r rµÚ _warningsr;r¶r·r?rŽr�Z_warnings_defaultsrbrŠÚ warnoptionsÚhasattrÚDeprecationWarningÚPendingDeprecationWarningÚ ImportWarningÚResourceWarningrrrrÚsh  ;  "  5 EC