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= 0N)Úappend) ÚAssertionErrorÚ isinstanceÚstrÚtypeÚ issubclassÚWarningÚintÚreÚcompileÚIÚ _add_filter)Úactionr r r8rr:rBrrrr‚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 )r4r5r6r7r8r9zinvalid action: %rrzlineno must be an int >= 0N)r:)r;r<rArE)rFr rr:rrrr¥s  cGsR|s6yt |¡Wntk r&YnXt d|¡n|tkrHt |¡tƒdS)Nr)ÚfiltersÚremoveÚ ValueErrorÚinsertr:Ú_filters_mutated)r:ÚitemrrrrEµs rEcCsgtdd…<tƒdS)zAClear the list of warning filters, so that no filters are active.N)rGrKrrrrrÃs c@seZdZdZdS)Ú _OptionErrorz,Exception used by option processing helpers.N)rÚ __module__Ú __qualname__Ú__doc__rrrrrMÈsrMc CsRxL|D]D}y t|ƒWqtk rH}ztd|tjd�Wdd}~XYqXqWdS)NzInvalid -W option ignored:)r)Ú _setoptionrMÚprintrr)ÚargsÚargrrrrÚ_processoptionsÍs   rUc Csø| d¡}t|ƒdkr$td|fƒ‚xt|ƒdkr>| 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ÚlenrMr:Ú _getactionÚ _getcategoryrBÚescaperArIÚ OverflowErrorr)rTÚpartsrFr r r8rrBrrrrQÕs0   rQcCsB|sdS|dkrdSxdD]}| |¡r|SqWtd|fƒ‚dS)Nr7Úallr6)r7r6r5r8r9r4zinvalid action: %r)Ú startswithrM)rFÚarrrr[ñs  r[cCs¸|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) r@ÚbuiltinsÚ rpartitionÚ __import__Ú ImportErrorrMÚgetattrÚAttributeErrorr?)r ÚmÚklassr8Ú_Úcatrrrr\ûs" r\cCs|jj}d|kod|kS)zFSignal whether the frame is an internal CPython implementation detail.Ú importlibÚ _bootstrap)Úf_codeÚ co_filename)r*rrrrÚ_is_internal_framesrrcCs&|j}x|dk r t|ƒr |j}qW|S)z;Find the next frame that doesn't involve CPython internals.N)Úf_backrr)r*rrrÚ_next_external_frames rté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}'rurzÚ__file__z.pycéÿÿÿÿÚ__main__rZ__warningregistry__)r<r@Ú __class__Ú UserWarningr>r?r.ÚformatrrrrÚ _getframeÚrangertrIÚ__dict__Ú f_globalsÚf_linenoÚgetÚlowerÚendswithÚargvriÚ setdefaultr) r r Ú stacklevelr#r*ÚxÚglobalsrr8rZfnlÚ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Úversionrr5r4r9rur6r8r7z1Unrecognized action (%r) in warnings.filters: %s)rAr‚r�Ú_filters_versionÚclearr<r@r=ryrGÚmatchr?Ú defaultactionrÚgetlinesÚ onceregistryÚ RuntimeErrorr r0)r r rrr8r‰Úmodule_globalsr#rÚkeyrLrFrrmÚ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)rrNrOÚ_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)Úrecordr8cCs(||_|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›r8rrrr˜Á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�r:rŸrržr>rÚjoin)r—rSÚ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ŸrGÚ_filtersrKrÚ _showwarningr r�r:r,)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ŸrGrKr¥rr )r—Úexc_inforrrÚ__exit__és     zcatch_warnings.__exit__)rrNrOrPr˜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#) rOr«rÚ tracebackr:Ú format_listÚlistr¡ÚrstriprÚRuntimeWarning)r­Ú msg_linesr°r®rr)r­rrÚ_warn_unawaited_coroutineós  r¶)rGÚ_defaultactionÚ _onceregistryrrrKTr7cCs td7adS)Nru)rŒrrrrrKsrKZgettotalrefcountrx)r r8r:r5)r r:)NN)N)NruN)NNNN).rPrÚ__all__rrr rr,r0r1rr@rrrErr!rMrUrQr[r\rrrtrrÚobjectr r r¶Ú _warningsrGr·r¸rKr�r‘Z_warnings_defaultsrgrŒÚ warnoptionsÚhasattrÚDeprecationWarningÚPendingDeprecationWarningÚ ImportWarningÚResourceWarningrrrrÚsh  ;  "  5 EC