Files
old-nlp/venv/lib/python3.7/__pycache__/warnings.cpython-37.pyc

182 lines
14 KiB
Plaintext
Raw Normal View History

2019-10-20 13:16:49 +02:00
B
<00>x-]O<00>@s<>dZddlZddddddd d
gZd<d d<05>Zd=d d<06>Zd d<0E>Zdd<10>ZeZdd<12>ZeZ dd<14>Z
de dddfdd<07>Z e ddfdd<08>Z dd<1A>Zdd <09>ZGdd<1D>de<10>Zdd<1F>Zd d!<21>Zd"d#<23>Zd$d%<25>Zd&d'<27>Zd(d)<29>Zd>d+d<03>Zd?d,d<04>ZGd-d.<2E>d.e<1A>ZGd/d
<EFBFBD>d
e<1A>Zd0d1<64>Zy0dd2lmZm Z m!Z!mZmZm"Z"e Z#e!Z$d3Z%Wn2e&k
<EFBFBD>rngZd4Z#iZ$d*a'd5d6<64>Z"dZ%YnXeej(<28>e%<25>s<>e)ed7<64><02>s<>e d4e*d8d*d9<64>e d:e*d*d;<3B>e d:e+d*d;<3B>e d:e,d*d;<3B>e d:e-d*d;<3B>[%dS)@z&Python part of the warnings subsystem.<2E>N<>warn<72> warn_explicit<69> showwarning<6E> formatwarning<6E>filterwarnings<67> simplefilter<65> resetwarnings<67>catch_warningscCst||||||<05>}t|<06>dS)z7Hook to write a warning to a file; replace if you like.N)<02>WarningMessage<67>_showwarnmsg_impl)<07>message<67>category<72>filename<6D>lineno<6E>file<6C>line<6E>msg<73>r<00>@/home/hamo/projects/misc/adreader/venv/lib/python3.7/warnings.pyr
scCst||||d|<04>}t|<05>S)z.Function to format a warning the standard way.N)r
<00>_formatwarnmsg_impl)r r rrrrrrrrscCsP|j}|dkr tj}|dkr dSt|<00>}y|<01>|<02>Wntk
rJYnXdS)N)r<00>sys<79>stderr<72>_formatwarnmsg<73>write<74>OSError)rr<00>textrrrr sr c Cs<>|jj}|j<02>d|j<03>d|<01>d|j<04>d<03>}|jdkrpyddl}|<03>|j|j<03>}Wqvtk
rld}d}YqvXn|j}|r<>|<04> <09>}|d|7}|j
dk <09>r<>y ddl }Wntk
r<EFBFBD>d}d}Yn4X|<05> <0C>}y|<05> |j
<EFBFBD>}Wntk
r<EFBFBD>d}YnX|dk <09>r<>|d7}x<>|D]t}|d|j|jf7}y$|dk <09>rD|<03>|j|j<03>}nd}Wntk
<EFBFBD>rdd}YnX|<04>r|<04> <09>}|d |7}<02>qWn|<06>s<>||<01>d
<EFBFBD>7}|S) N<>:z: <20>
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 <00>__name__rrr r<00> linecache<68>getline<6E> Exception<6F>strip<69>source<63> tracemallocZ
is_tracingZget_object_traceback) rr <00>srrr$Ztracing<6E>tb<74>framerrrr#sR"
    





rcCsdyt}Wntk
rYn<X|tk rXt|<01>s6td<01><01>||j|j|j|j|j |j
<EFBFBD>dSt |<00>dS)z7Hook to write a warning to a file; replace if you like.z:warnings.showwarning() must be set to a function or methodN) r<00> NameError<6F>_showwarning_orig<69>callable<6C> TypeErrorr r rrrrr )rZswrrr<00> _showwarnmsg`s r,cCsHyt}Wntk
rYn$X|tk r@||j|j|j|j|j<07>St|<00>S)z.Function to format a warning the standard way.) rr(<00>_formatwarning_origr r rrrr)rZfwrrrrus
r<00>FcCs<>|dkstd|f<00><01>t|t<02>s(td<03><01>t|t<03>s:td<04><01>t|t<05>sLtd<05><01>t|t<02>s^td<06><01>t|t<06>rp|dksxtd<08><01>|s<>|r<>dd l}|r<>|<06>||j <09>}nd }|r<>|<06>|<03>}nd }t
||||||d
<EFBFBD>d S) a<>Insert an entry into the list of warnings filters (at the front).
'action' -- one of "error", "ignore", "always", "default", "module",
or "once"
'message' -- a regex that the warning message must match
'category' -- a class that the warning must be a subclass of
'module' -- a regex that the module name must match
'lineno' -- an integer line number, 0 matches all warnings
'append' -- if true, append to the list of filters
)<06>error<6F>ignore<72>always<79>default<6C>module<6C>oncezinvalid action: %rzmessage must be a stringzcategory must be a classz#category must be a Warning subclasszmodule must be a stringrzlineno must be an int >= 0N)<01>append) <0B>AssertionError<6F>
isinstance<EFBFBD>str<74>type<70>
issubclass<EFBFBD>Warning<6E>int<6E>re<72>compile<6C>I<> _add_filter)<07>actionr r r3rr5r=rrrr<00>s"
  cCsH|dkstd|f<00><01>t|t<02>r(|dks0td<04><01>t|d|d||d<06>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
)r/r0r1r2r3r4zinvalid action: %rrzlineno must be an int >= 0N)r5)r6r7r<r@)rAr rr5rrrr<00>s
 cGsR|s6yt<00>|<01>Wntk
r&YnXt<00>d|<01>n|tkrHt<00>|<01>t<05>dS)Nr)<06>filters<72>remove<76>
ValueError<EFBFBD>insertr5<00>_filters_mutated)r5<00>itemrrrr@<00>s
r@cCsgtdd<01><t<01>dS)zAClear the list of warning filters, so that no filters are active.N)rBrFrrrrr<00>s c@seZdZdZdS)<03> _OptionErrorz,Exception used by option processing helpers.N)r<00>
__module__<EFBFBD> __qualname__<5F>__doc__rrrrrH<00>srHc CsRxL|D]D}y t|<01>Wqtk
rH}ztd|tjd<02>Wdd}~XYqXqWdS)NzInvalid -W option ignored:)r)<05>
_setoptionrH<00>printrr)<03>args<67>argrrrr<00>_processoptions<6E>s

 rPc Cs<>ddl}|<00>d<02>}t|<02>dkr,td|f<00><01>xt|<02>dkrF|<02>d<05>q.Wdd<07>|D<00>\}}}}}t|<03>}|<01>|<04>}t|<05>}|<01>|<06>}|r<>|d}|r<>yt|<07>}|dkr<>t <09>Wq<>t t
fk
r<EFBFBD>td |f<00>d<00>Yq<>Xnd}t |||||<07>dS)
Nrr<00>ztoo many fields (max 5): %rr.cSsg|] }|<01><00><00>qSr)r")<02>.0r%rrr<00>
<listcomp><3E>sz_setoption.<locals>.<listcomp><3E>$zinvalid lineno %r) r=<00>split<69>lenrHr5<00>
_getactionZescape<70> _getcategoryr<rD<00> OverflowErrorr)rOr=<00>partsrAr r r3rrrrrL<00>s.
 

rLcCsB|sdS|dkrdSxdD]}|<01>|<00>r|SqWtd|f<00><01>dS)Nr2<00>allr1)r2r1r0r3r4r/zinvalid action: %r)<02>
startswithrH)rA<00>arrrrW<00>s

rWcCsddl}|stS|<01>d|<00>rPy t|<00>}Wq<>tk
rLtd|f<00>d<00>Yq<>Xn<>|<00>d<04>}|d|<03>}||dd<00>}yt|dd|g<01>}Wn$tk
r<EFBFBD>td|f<00>d<00>YnXyt ||<05>}Wn$t
k
r<EFBFBD>td|f<00>d<00>YnXt |t<01>s<>td|f<00><01>|S)Nrz^[a-zA-Z0-9_]+$zunknown warning category: %r<>.<2E>zinvalid module name: %rzinvalid warning category: %r) r=r;<00>match<63>evalr(rH<00>rfind<6E>
__import__<EFBFBD> ImportError<6F>getattr<74>AttributeErrorr:)r r=<00>cat<61>ir3Zklass<73>mrrrrX<00>s,  
 
rXcCs|jj}d|kod|kS)zFSignal whether the frame is an internal CPython implementation detail.<2E> importlib<69>
_bootstrap)<02>f_code<64> co_filename)r'rrrr<00>_is_internal_framesrncCs&|j}x|dk r t|<00>r |j}qW|S)z;Find the next frame that doesn't involve CPython internals.N)<02>f_backrn)r'rrr<00>_next_external_frames
rpr_c Csvt|t<01>r|j}|dkrt}t|t<04>r0t|t<01>sDtd<02>t|<01>j<08><01><01>yZ|dks\t t
<EFBFBD> d<03><01>rht
<EFBFBD> |<02>}n4t
<EFBFBD> d<03>}x(t |d<00>D]}t |<04>}|dkr<>t<0E>q<>WWntk
r<EFBFBD>t
j}d}YnX|j}|j}d|kr<>|d}nd}|<06>d<06>} | <09>r| <09><13>}
|
<EFBFBD>d<07><01>rP| dd<08>} n>|d k<02>rFyt
jd
} Wntk
<EFBFBD>rDd } YnX| <09>sP|} |<06>d i<00>} t||| ||| ||<03>dS) z:Issue a warning, or maybe ignore it or raise an exception.Nz/category must be a Warning subclass, not '{:s}'r_rz<string><3E>__file__z.pyc<79><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>__main__rZ__warningregistry__)r7r;<00> __class__<5F> UserWarningr9r:r+<00>formatrrnr<00> _getframe<6D>rangerprD<00>__dict__<5F> f_globals<6C>f_lineno<6E>get<65>lower<65>endswith<74>argvrf<00>
setdefaultr) r r <00>
stacklevelr#r'<00>x<>globalsrr3rZfnl<6E>registryrrrr#sL
 
 


 

 cCs<>t|<03>}|dkr8|pd}|dd<00><00><01>dkr8|dd<02>}|dkrDi}|<05>dd<05>tkrd|<05><04>t|d<t|t<06>r~t|<00>}|j}n |}||<00>}|||f} |<05>| <09>r<>dSx^t D]R}
|
\} } } }}| dks<>| <0C>
|<08>r<>t || <0A>r<>|dks<>|<0E>
|<04>r<>|dks<>||kr<>Pq<>Wt } | dk<02>rdSddl }|<10>||<06>| dk<02>r2|<00>| dk<02>rfd || <||f}t<0F>|<11><01>r\dSd t|<nf| d
k<02>rrnZ| d k<02>r<>d || <||df}|<05>|<12><01>r<>dSd ||<n$| d k<02>r<>d || <ntd | |
f<00><01>t|||||<07>} t| <0C>dS)Nz <unknown><3E><><EFBFBD><EFBFBD><EFBFBD>z.py<70>versionrr0r/r4r_r1r3r2z1Unrecognized action (%r) in warnings.filters:
%s)r<r}r|<00>_filters_version<6F>clearr7r;r8rtrBr`r:<00> defaultactionrZgetlines<65> onceregistry<72> RuntimeErrorr
r,)r r rrr3r<>Zmodule_globalsr#r<00>keyrGrArrg<00>modZlnrZoncekeyZaltkeyrrrrWsj 





 

 



 


 c@s"eZdZdZddd<04>Zdd<06>ZdS)r
)r r rrrrr#NcCs>||_||_||_||_||_||_||_|r4|jnd|_dS)N) r r rrrrr#r<00>_category_name)<08>selfr r rrrrr#rrr<00>__init__<5F>szWarningMessage.__init__cCsd|j|j|j|j|jfS)NzD{message : %r, category : %r, filename : %r, lineno : %s, line : %r})r r<>rrr)r<>rrr<00>__str__<5F>szWarningMessage.__str__)NNN)rrIrJZ_WARNING_DETAILSr<53>r<>rrrrr
<00>s
r
c@s8eZdZdZddd<04>dd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>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)<02>recordr3cCs(||_|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)<05>_recordr<00>modules<65>_module<6C>_entered)r<>r<>r3rrrr<><00>szcatch_warnings.__init__cCsPg}|jr|<01>d<01>|jtjdk r4|<01>d|j<00>t|<00>j}d|d<05>|<01>fS)Nz record=Truer<65>z module=%rz%s(%s)z, )r<>r5r<>rr<>r9r<00>join)r<>rN<00>namerrr<00>__repr__<5F>s

zcatch_warnings.__repr__cCs~|jrtd|<00><01>d|_|jj|_|jdd<00>|j_|j<02><05>|jj|_|jj|_|j rvg}|j
|j_|jj |j_|SdSdS)NzCannot enter %r twiceT) r<>r<>r<>rB<00>_filtersrFr<00> _showwarningr r<>r5r))r<>Zlogrrr<00> __enter__<5F>s 




 zcatch_warnings.__enter__cGs>|jstd|<00><01>|j|j_|j<03><05>|j|j_|j|j_dS)Nz%Cannot exit %r without entering first) r<>r<>r<>r<>rBrFr<>rr )r<><00>exc_inforrr<00>__exit__<5F>s  


zcatch_warnings.__exit__)rrIrJrKr<>r<>r<>r<>rrrrr <00>s
  cszd<01>j<00>d<02>g}<01>jdk rVddl<02>ddl}<02><00>fdd<05>}|<01>d<06>||<02>t|<03><00><01>7}d<07>|<01><01>d<08>}t |t
d <09>d
<EFBFBD>dS) Nz coroutine 'z' was never awaited
rc3s8x2t<00>j<01>D]$\}}}<02><01>||<01>}||||fVq WdS)N)<03>reversed<65> cr_originr )rr<00>funcnamer)<02>cororrr<00>extract<63>s z*_warn_unawaited_coroutine.<locals>.extractz-Coroutine created at (most recent call last)
r.r<00>)r r<>r#) rJr<>r<00> tracebackr5Z format_list<73>listr<74><00>rstripr<00>RuntimeWarning)r<>Z msg_linesr<73>r<>rr)r<>rr<00>_warn_unawaited_coroutine<6E>s

r<>)rB<00>_defaultaction<6F> _onceregistryrrrFTr2cCs td7adS)Nr_)r<>rrrrrF"srF<00>gettotalrefcountrs)r r3r5r0)r r5)NN)N)Nr_N)NNNN).rKr<00>__all__rrr rr)r,r-rr;rrr@rr!rHrPrLrWrXrnrprr<00>objectr
r r<><00> _warningsrBr<>r<>rFr<>r<>Z_warnings_defaultsrdr<><00> warnoptions<6E>hasattr<74>DeprecationWarning<6E>PendingDeprecationWarning<6E> ImportWarning<6E>ResourceWarningrrrr<00><module>sh

;  "

5
EC