Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/jinja2/__pycache__/debug.cpython-37.pyc

98 lines
9.2 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>/<2F>]<5D>/<00>@sddZddlZddlZddlmZmZddlmZmZddl m
Z
ddl m Z m Z mZyddlmZWnek
r|dZYnXy ed<08>Wn.ek
r<EFBFBD>d ZYnek
r<EFBFBD>d
ZYnXGd d <0C>d e<16>Zd d<0E>ZGdd<10>de<16>Zd dd<12>Zd!dd<14>Zd"dd<16>Zdd<18>Zdd<1A>Zdd<1C>ZdZ edk<08>r^ej!dk<05>r<dd<1F>Z n"y
e<1F>Z Wne"k
<EFBFBD>r\YnX[dS)#aQ
jinja2.debug
~~~~~~~~~~~~
Implements the debug interface for Jinja. This module does some pretty
ugly stuff with the Python traceback system in order to achieve tracebacks
with correct line numbers, locals and contents.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
<EFBFBD>N)<02> TracebackType<70>CodeType)<02>missing<6E> internal_code)<01>TemplateSyntaxError)<03> iteritems<6D>reraise<73>PY2)<01>tproxyzraise TypeError, 'foo'zraise __jinja_exception__[1]z4raise __jinja_exception__[0], __jinja_exception__[1]c@s@eZdZdZdd<03>Zedd<05><00>Zdd<07>Zedd <09><00>Zd
d <0B>Z d S) <0A>TracebackFrameProxyzProxies a traceback frame.cCs||_d|_dS)N)<02>tb<74>_tb_next)<02>selfr <00>r<00>0/tmp/pip-install-c3kgu56x/Jinja2/jinja2/debug.py<70>__init__'szTracebackFrameProxy.__init__cCs|jS)N)r )rrrr<00>tb_next+szTracebackFrameProxy.tb_nextcCsBtdk r8yt|j|r|jpd<00>Wntk
r6YnX||_dS)N)<04> tb_set_nextr <00> Exceptionr )r<00>nextrrr<00>set_next/s zTracebackFrameProxy.set_nextcCsd|jjjkS)N<>__jinja_template__)r <00>tb_frame<6D> f_globals)rrrr<00>is_jinja_frame:sz"TracebackFrameProxy.is_jinja_framecCs t|j|<01>S)N)<02>getattrr )r<00>namerrr<00> __getattr__>szTracebackFrameProxy.__getattr__N)
<EFBFBD>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r<00>propertyrrrrrrrrr $s   r cs*t|<00><01>tdkr<14>S<00>fdd<02>}tt|<01>S)Ncs@|dkrt<00>|d<00>S|dkr,<2C>j||<02>nt<00>|<00>||<02>SdS)N)<02>__getattribute__rr<00> __setattr__)rr$)Z operation<6F>args<67>kwargs)<01>proxyrr<00>operation_handlerFs
z+make_frame_proxy.<locals>.operation_handler)r r
r)<02>framer(r)r'r<00>make_frame_proxyBs
 r*c@sPeZdZdZdd<03>Zddd<06>Zddd <09>Zed
d <0B><00>Zed d <0A><00>Z edd<0F><00>Z
dS)<12>ProcessedTracebackz?Holds a Jinja preprocessed traceback for printing or reraising.cCsV|s td<01><01>||_||_||_d}x$|jD]}|dk r@|<04>|<05>|}q*W|<04>d<00>dS)Nzno frames for this traceback?)<05>AssertionError<6F>exc_type<70> exc_value<75>framesr)rr-r.r/Zprev_tbr rrrrSs  
zProcessedTraceback.__init__NcCs*tj|j|j|jd|d<02>}d<03>|<02><01><06>S)z#Return a string with the traceback.r)<01>limit<69>)<07> traceback<63>format_exceptionr-r.r/<00>join<69>rstrip)rr0<00>linesrrr<00>render_as_textas z!ProcessedTraceback.render_as_textFcCs,ddlm}d|||d<04>|<00><02><00>dd<06>fS)z<Return a unicode string with the traceback as rendered HTML.r)<01>render_tracebackz%s
<!--
%s
-->)<01>fullzutf-8<>replace)Zjinja2.debugrendererr8r7<00>decode)rr9r8rrr<00>render_as_htmlgs 
z!ProcessedTraceback.render_as_htmlcCs t|jt<02>S)z*`True` if this is a template syntax error.)<03>
isinstancer.r)rrrr<00>is_template_syntax_errorosz+ProcessedTraceback.is_template_syntax_errorcCs|j|j|jdfS)z;Exception info tuple with a proxy around the frame objects.r)r-r.r/)rrrr<00>exc_infotszProcessedTraceback.exc_infocCs*|jd}t|<01>tk r|j}|j|j|fS)z'Standard python exc_info for re-raisingr)r/<00>typerr r-r.)rr rrr<00>standard_exc_infoys
 z$ProcessedTraceback.standard_exc_info)N)F) rrr r!rr7r<r"r>r?rArrrrr+Ps

  r+cCs2|\}}}t|t<01>r$t||<01>}d}nd}t||<05>S)z7Creates a processed traceback object from the exc_info.r<00>)r=r<00>translate_syntax_error<6F>translate_exception)r?Z source_hintr-r.r <00> initial_skiprrr<00>make_traceback<63>s 


rFcCs8||_d|_|j|df}|j}|dkr*d}t|||j<05>S)z4Rewrites a syntax error to please traceback systems.TNz <unknown>)<06>sourceZ
translated<EFBFBD> __class__<5F>filename<6D> fake_exc_info<66>lineno)<04>errorrGr?rIrrrrC<00>s rCc Cs<>|d}g}xt|<01>D]}|dk r|j}qW|}xz|dk r<>|jjtkrN|j}q2|j}|jj<05>d<03>}|dk r<>|<07>|j<08>}t |dd<01>|f|j
|<08>d}|<03> t |<02><01>|}q2W|s<>t |d|d|d<00>t|d|d|<03>S)z<>If passed an exc_info it will automatically rewrite the exceptions
all the way down to the correct line numbers and frames.
<20>NrrrB)<0F>rangerr<00>f_coderr<00>getZget_corresponding_lineno<6E> tb_linenorJrI<00>appendr*rr+) r?rEr r/<00>xZ
initial_tbr<00>templaterKrrrrD<00>s*

  
rDc Cs<>|<00>d<01>}|r|<01><01><00><02>}ni}i}x<>t|<00>D]v\}}|<04>d<02>r.|tkrJq.y|<04>dd<04>\}}}t|<07>}Wntk
r~w.YnX|<03>|d<05>d}||kr.||f||<q.Wx6t|<03>D]*\}\}}|tkr<>|<02> |d<00>q<>|||<q<>W|S)N<>contextZl_<6C>_rM)<01><><EFBFBD><EFBFBD><EFBFBD>r)
rP<00>get_all<6C>copyr<00>
startswithr<00>split<69>int<6E>
ValueError<EFBFBD>pop) Z real_locals<6C>ctx<74>localsZlocal_overridesr<00>valuerV<00>depthZ cur_depthrrr<00>get_jinja_locals<6C>s*
  rcc Cs<>|\}}}|dk r,t|jj<02>}|<06>dd<01>ni}|||dd<03>dd<04>}td|dt|d<07>}y<>|dkrnd} n8|jjj}
|
d kr<>d
} n |
<EFBFBD>d <0B>r<>d |
d d<01>} nd} t r<>t
d|j |j |j |j|j|j|j|| |j|jdd<0F>}n8t
d|j|j |j |j |j|j|j|j|| |j|jdd<0F>}Wn$tk
<EFBFBD>r>} zWdd} ~ XYnXyt|||<06>Wnt<17><18>}|dj} YnX|dd<03>| fS)z!Helper for `translate_exception`.N<>__jinja_exception__rM)r<00>__file__rdr<00>
rB<00>execrT<00>rootztop-level template codeZblock_z
block "%s"<22>rr)rcr<00>f_localsr^<00>compile<6C> raise_helperrO<00>co_namerZr r<00>
co_nlocals<EFBFBD> co_stacksize<7A>co_flags<67>co_code<64> co_consts<74>co_names<65> co_varnames<65>co_firstlineno<6E> co_lnotab<61>co_kwonlyargcountrrg<00>sysr?r) r?rIrKr-r.r r`<00>globals<6C>code<64>location<6F>function<6F>eZnew_tbrrrrJ<00>sN
 


  
 
rJcsddl<00>ddlm<02>tr4t<04>jd<04>r,<2C>j}q:<3A>j}n<06>j}Gdd<06>d<06>j <09>}d|fd<08><02>
|<01>fg|_ tt d <09>r<>Gd
d<06>d<06>j <09>}d <0B><02>
|<01>fd <0C><02>
|<01>fd|fd<08><02>
|<01>fg|_ Gd d<0E>d|<01><03>d<0F><02>
<EFBFBD><01>fd<10><02>
|<01>fd<11>jfd<12>jfg<04>_ <0B><00><01>fdd<14>}|S)z<>This function implements a few ugly things so that we can patch the
traceback objects. The function returned allows resetting `tb_next` on
any python traceback object. Do not attempt to use this on non cpython
interpreters
rN)rZPy_InitModule4_64c@s eZdZdS)z"_init_ugly_crap.<locals>._PyObjectN)rrr rrrr<00> _PyObject>sr~<00> ob_refcnt<6E>ob_type<70>
getobjectsc@s eZdZdS)z"_init_ugly_crap.<locals>._PyObjectN)rrr rrrrr~GsZ_ob_nextZ_ob_prevc@s eZdZdS)z#_init_ugly_crap.<locals>._TracebackN)rrr rrrr<00>
_TracebackPsr<>rr<00>tb_lastirQcs<>t|<00><00>r|dks$t|<01><00>s$td<02><01><01><01>t|<00><01>}|jdk rZ<72><01>t|j<04><01>}|jd8_|dkrr<72><02><06><01><01>|_n(<28><01>t|<01><01>}|jd7_<05><02>|<01>|_dS)z0Set the tb_next attribute of a traceback object.Nz/tb_set_next arguments must be traceback objectsrB)r=<00> TypeError<6F> from_address<73>idrr<00>POINTER<45>pointer)r r<00>obj<62>old)rr<><00>ctypesrrrYs

z$_init_ugly_crap.<locals>.tb_set_next) r<><00>typesrr <00>hasattr<74> pythonapi<70>c_int64<36>c_int<6E> c_ssize_t<5F> Structurer<65><00>_fields_rx)Z _Py_ssize_tr~rr)rr<>r<>r<00>_init_ugly_crap*s.  
    r<>)<02><00>cCs
||_dS)N)r)r rrrrrrsr)N)N)r)#r!rxr2r<>rrZ jinja2.utilsrrZjinja2.exceptionsrZjinja2._compatrrr Z__pypy__r
<00> ImportErrorrg<00> SyntaxErrorrlr<><00>objectr r*r+rFrCrDrcrJr<>r<00> version_inforrrrr<00><module> sD 
 
4
,FD