\d!RRdZddlZgdZd,dZd-dZdZdZeZdZeZ d Z d e d dd fd Z e dd fd Z dZdZGddeZdZdZdZdZdZdZd.dZ d/dZGddeZGddeZdZefejd d!Zd"Z dd#l!m"Z"m#Z#m$Z$mZmZm%Z%e#Z&e$Z'd$Z(n#e)$rgZ"d%Z&iZ'da*d&Z%d Z(YnwxYweej+e(sSe,ed'sGe d%e-d(d)e d*e-d+e d*e.d+e d*e/d+e d*e0d+[(dS)0z&Python part of the warnings subsystem.N)warn warn_explicit showwarning formatwarningfilterwarnings simplefilter resetwarningscatch_warningscLt||||||}t|dS)7Hook to write a warning to a file; replace if you like.N)WarningMessage_showwarnmsg_impl)messagecategoryfilenamelinenofilelinemsgs 6J:\tools\MySQL Workbench 8.0 CE\python\Lib\warnings.pyrr s- (HfdD I ICccHt||||d|}t|S).Function to format a warning the standard way.N)r _formatwarnmsg_impl)rrrrrrs rrrs' (HfdD I IC s # ##rc|j}|tj}|dSt|} ||dS#t $rYdSwxYwN)rsysstderr_formatwarnmsgwriteOSError)rrtexts rrrsm 8D |z < F #  D  4      sA AAc|jj}|jd|jd|d|jd}|j: ddl}||j|j}n#t$rd}d}Yn wxYw|j}|r| }|d|zz }|j ddl }| } | |j }n&#t$rd}YnwxYw#t$rd}d}YnwxYw|x|dz }|D]o}|d|jd |jdz } |!||j|j}nd}n#t$rd}YnwxYw|r| }|d |zz }pn |s||d z }|S) N:z:  rz %s Tz-Object allocated at (most recent call last): z File "z ", lineno z %s z<: Enable tracemalloc to get the object allocation traceback )r__name__rrrr linecachegetline Exceptionstripsource tracemalloc is_tracingget_object_traceback) rrsr'rr,tracingtbframes rrr#sC|$H L D D3: D D D DS[ D D DA x     $$S\3:>>DD   DIII   x zz|| X_ z     ",,..G  55cjAA       GBBB  > A AA + +78  ,(00NN#    DDD +::<= 0Nappend) isinstancestrtype issubclassWarningintrecompileI _add_filter)actionrrrDrrIrPs rrrsZ     7=v?    gs # #??%???? h % %AA'AAAA h ( (OO*OOOO fc " "==$==== fc " "(v{{{ '(3{{& **Wbd++ F##66&IIIIIIrc|dvs Jd|t|tr|dks Jdt|d|d||dS)aInsert 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 r?rFrrGNrH)rJrOrS)rTrrrIs rrrs     7=v?    fc " "(v{{{ '(3{{hfVDDDDDDrc|s< tj|n#t$rYnwxYwtjd|n|tvrtj|t dS)Nr)filtersremove ValueErrorinsertrI_filters_mutated)rIitems rrSrSs !  N4     D q$ w   N4 s  &&c:gtdd<tdS)zAClear the list of warning filters, so that no filters are active.N)rWr[rrr r s!GAAAJrceZdZdZdS) _OptionErrorz,Exception used by option processing helpers.N)r& __module__ __qualname____doc__r^rrr`r`s66Drr`c|D]E} t|#t$r&}td|tjYd}~>d}~wwxYwdS)NzInvalid -W option ignored:)r) _setoptionr`printrr)argsargrs r_processoptionsris|FF F sOOOO F F F .#* E E E E E E E E E FFFs AAAc||d}t|dkrtd|t|dkr(|dt|dk(d|D\}}}}}t |}t |}|s|rddl}|r||}|r||dz}|rF t|}|dkrtn*#ttf$rtd|dwxYwd}t|||||dS) Nr$ztoo many fields (max 5): r=c6g|]}|Sr^)r*).0r/s r z_setoption..s61A1A1A56231A1A1Arrz\Zzinvalid lineno ) splitlenr`rI _getaction _getcategoryrPescaperOrY OverflowErrorr)rhpartsrTrrrDrrPs rreres IIcNNE 5zzA~~lCCABBB e**q.. R e**q..1A1A:?1A1A1A-FGXvv   FH%%H& %))G$$ +6""U*  J[[Fzz  M* J J J,ff>??T I J67Hff=====s "C??%D$cz|sdS|dkrdSdD]}||r|cStd|)NrCallrB)rCrBrArDrEr@rF) startswithr`)rTas rrqrqsb y xx G <<   HHH  ,vv7 8 88rc|stSd|vrddl}|}nO|d\}}} t|dd|g}n!#t$rt d|dwxYw t ||}n!#t$rt d|dwxYwt|tst d||S)N.rzinvalid module name: zunknown warning category: zinvalid warning category: ) rNbuiltins rpartition __import__ ImportErrorr`getattrAttributeErrorrM)rmklassrD_cats rrrrrs  (#..s335 P64w77AA P P P,FFDEE4 O PSa SSSlXXGHHdRS c7 # #IlXXGHHH JsAA!%A66Bc*|jj}d|vod|vS)zFSignal whether the frame is an internal CPython implementation detail. importlib _bootstrap)f_code co_filename)r2rs r_is_internal_framers!|'H ( " ?|x'??rcf|j}|'t|r|j}|t||S)z;Find the next frame that doesn't involve CPython internals.)f_backr)r2s r_next_external_framers? LE   25 9 9     25 9 9  Lrc t|tr|j}|t}t|trt |ts4t dt |j |dks!ttj drtj |}nAtj d}t|dz D]}t|}|t|j}|jj}|j}n #t$rtj}d}d}YnwxYwd|vr |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}'rrr&z__warningregistry__)rJrN __class__ UserWarningrLrMr6formatr&rr _getframerangerrY f_globalsrrf_lineno__dict__ setdefaultr) rr stacklevelr+r2xglobalsrrrDregistrys rrrs'7##%$ x & &F:h+H+HF%%+VDNN,C%D%DFF F ??0q1A1ABB?M*--EEM!$$E:a<(( % %,U33=$$!/<+ ,W$!!"7<z.pyversionrrAr@rErrBrDrCzUnrecognized action (z) in warnings.filters: )rOlowerget_filters_versionclearrJrNrKrrWmatchrM defaultactionr'getlines onceregistry RuntimeErrorr r9)rrrrrDrmodule_globalsr+r"keyr\rTrrmodlnr'oncekeyaltkeys rrrGs[[F ~([ "##;    % ' 'CRC[F||Iq!!%555.'7##$7||$(7## 6 "C||C$(!S#r [CIIdOO[ x % % [CIIf--[ 1WW" E  x000    "   G $ $  F ! W 8   8   !$ <<    F 9   lvvtt  (Hff E ECrc$eZdZdZ ddZdZdS)r )rrrrrrr+Nc||_||_||_||_||_||_||_|r|jnd|_dSr) rrrrrrr+r&_category_name)selfrrrrrrr+s r__init__zWarningMessage.__init__sN         3;Eh//rc Xd|jd|jd|jd|jd|jd S)Nz {message : z , category : z , filename : z , lineno : z , line : })rrrrr)rs r__str__zWarningMessage.__str__s=$(LLL$2E2E2E$(MMM4;;; K Lr)NNN)r&rarb_WARNING_DETAILSrrr^rrr r sR*BF#' F F F FLLLLLrr c:eZdZdZdddeddddZdZdZd ZdS) r a9A 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. If the 'action' argument is not None, the remaining arguments are passed to warnings.simplefilter() as if it were called immediately on entering the context. FNr)recordrDrTrrrIc||_|tjdn||_d|_| d|_dS||||f|_dS)zSpecify 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. NwarningsF)_recordrmodules_module_entered_filter)rrrDrTrrrIs rrzcatch_warnings.__init__sM 28.s{:..f  >DLLL"Hff=DLLLrcg}|jr|d|jtjdur|d|jzt |j}|dd|dS)Nz record=Truerz module=%r(z, ))rrIrrrrLr&join)rrgnames r__repr__zcatch_warnings.__repr__s{ < ' KK & & & > >  , #}QQQ/  %%''' L4!%!? < # $, ' ' < C-0ZDL *(,|'EDL $J4rc|jstd|z|j|j_|j|j|j_|j|j_dS)Nz%Cannot exit %r without entering first) rrrrrWr[rrr)rexc_infos r__exit__zcatch_warnings.__exit__sa} OFMNN N#}  %%'''#'#4  )-)? &&&r) r&rarbrcrNrrrrr^rrr r sy$"'twq>>>>>"222*@@@@@rr z@{name!r} is deprecated and slated for removal in Python {remove})_versionc|dd|d}|dd|ks|dd|kr#|ddkr|d|d }t|||| }t|td dS) a;Warn that *name* is deprecated or should be removed. RuntimeError is raised if *remove* specifies a major/minor tuple older than the current Python version or the same version but past the alpha. The *message* argument is formatted with *name* and *remove* as a Python version (e.g. "3.11"). rr{rNalphaz% was slated for removal after Python z alpha)rrX)r)rrrDeprecationWarning)rrrXrremove_formattedrs r _deprecatedrs!)11fQi11! v8BQB<6#9#9hqkW>T>TVV>NVVV3nn$/?n@@ S$333333rcPdjdg}jPddlddl}fd}|d||t |z }d|d}t|td dS) Nz coroutine 'z' was never awaited rc3~KtjD]$\}}}||}||||fV%dSr)reversed cr_originr()rrfuncnamercoror's rextractz*_warn_unawaited_coroutine..extract s^.6t~.F.F 9 9*&( ((6::488888 9 9rz-Coroutine created at (most recent call last) r=r%r)rrr+) rbrr' tracebackrI format_listlistrrstriprRuntimeWarning)r msg_linesrrrr's` @r_warn_unawaited_coroutiners>d'>>>I ~!######## 9 9 9 9 9 9 IJJJY**4 ??;;; '')   # #D ) )C ~!DAAAAAAr)rW_defaultaction _onceregistryrrr[TrCctdz adS)Nr)rr^rrr[r[1sArgettotalrefcount__main__)rrDrIrA)rrI)NNr)NrN)NNNN)1rcr__all__rrrrr4r9r;rrNrrrSr r)r`rirerqrrrrrrobjectr r _DEPRECATED_MSG version_inforr _warningsrWrrr[rr_warnings_defaultsrr warnoptionshasattrrPendingDeprecationWarning ImportWarningResourceWarningr^rrrs,,  . . . $$$$    8 8 8 v &$ $ $ $$&1!J!J!J!JF#*!EEEEE         9   FFF>>>8999*@@@ &#&#&#&#R>BDDDDNLLLLLVLLL,I@I@I@I@I@VI@I@I@XU-43CS44444(BBB<BBBBBBBBBBBBBBBB"M L   GML  C 73* + +Cy+=( 4 4 4 4 X(:1EEEE X(A!LLLL X a@@@@ XBBBBsB))B>=B>