/usr/lib/python3/dist-packages/lxml/__pycache__
NameSizeModeActions
builder.cpython-310.pyc59080644editdlrm
cssselect.cpython-310.pyc36080644editdlrm
doctestcompare.cpython-310.pyc139370644editdlrm
ElementInclude.cpython-310.pyc37760644editdlrm
pyclasslookup.cpython-310.pyc2040644editdlrm
sax.cpython-310.pyc81700644editdlrm
usedoctest.cpython-310.pyc3940644editdlrm
_elementpath.cpython-310.pyc63300644editdlrm
__init__.cpython-310.pyc6650644editdlrm
Edit: /usr/lib/python3/dist-packages/lxml/__pycache__/ElementInclude.cpython-310.pyc (3776B)
o ;/bp!@sdZddlmZzddlmZddlmZWney+ddlmZddl mZYnwdZ e dZ e dZ e dZ d ZGd d d ejZGd d d eZdddZdddZddZddefddZddedfddZdS)a Limited XInclude support for the ElementTree package. While lxml.etree has full support for XInclude (see `etree.ElementTree.xinclude()`), this module provides a simpler, pure Python, ElementTree compatible implementation that supports a simple form of custom URL resolvers. )etree)urljoin)urlopenz!{http://www.w3.org/2001/XInclude}includefallback*c@ eZdZdS)FatalIncludeErrorN__name__ __module__ __qualname__rr5/usr/lib/python3/dist-packages/lxml/ElementInclude.pyr Kr c@r )LimitedRecursiveIncludeErrorNr rrrrrOrrNcCsHt|d}|dkrt|}n |}|sd}||}||S)Nrbxmlutf-8)openrparsegetrootreaddecodeclose)hrefrencodingfiledatarrrdefault_loader`s  r cCs^|dkrt||}|Sd|vrt|}nt|d}|}||s(d}||}|S)Nrz://rr)rrrrrrrr)rrrparserrfrrr_lxml_default_loaderqs    r#csdfdd }|S)Ncs |||SNr)rrrr!loaderrrloads z_wrap_et_loader..loadNNr)r&r'rr%r_wrap_et_loadersr)cCs|durd}n |dkrtd||dur/t|dr!|}|}n|}t|dr.|jj}n t|dr8|}t||||dS)Nrz;expected non-negative depth or None for 'max_depth', got %rrdocinfo) ValueErrorhasattrr getroottreer+URL_include)elemr&base_url max_depthtreerrrrs     cCs|dur t|}nt}|durt}|j}t|t}|D]}|jt krt || d} | dd} | } | dkr| |vrGt d| |dkrQtd| || | |d} | durdt d| | ft| || |d | h|B} |jr}| jpxd |j| _| dur| S| || q | d kr|| | | d d } | durt d| | f|}|dur|jpd | |_n| dur| S| jpd | |jpd | _| |q t d| |jtkr| } | dur| jt krt d|jq t d|j|S)Nrrrz recursive include of %r detectedrz5maximum xinclude depth reached when including file %s)r!zcannot load %r as %rtextr)rz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r)z0Invalid element found in XInclude namespace (%r))r)r#setr.r!listiterXINCLUDE_ITER_TAGtagXINCLUDE_INCLUDErget getparentr rr0tailreplace getpreviousr7removeXINCLUDE_FALLBACK)r1r&r2r3 _parent_hrefs load_includer!include_elementserrparentnoder7 predecessorrrrr0sz        r0r$r()__doc__lxmlrurlparserurllib2r ImportError urllib.parseurllib.requestXINCLUDEr=rDr;DEFAULT_MAX_INCLUSION_DEPTHLxmlSyntaxErrorr rr r#r)rr0rrrrs2+