o
    y¬´\Ÿ¬  ã                   @   s   d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZ ddlmZ ddlmZ d	d
„ ZG dd„ deƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZG dd„ deƒZd‚dd„ZzddlmZ dd„ ZW n ey„   d d„ ZY nw d!d"„ Zdƒd$d%„Zd„d'd(„Zd„d)d*„Z d+d,„ Z!d-d.„ Z"d…d0d1„Z#G d2d3„ d3eƒZ$d4d5„ Z%d6d7„ Z&			8	d†d9d:„Z'd;d<„ Z(d‡d=d>„Z)G d?d@„ d@eƒZ*dAdB„ Z+G dCdD„ dDeƒZ,G dEdF„ dFeƒZ-dˆdGdH„Z.G dIdJ„ dJeƒZ/dKdL„ Z0dMdN„ Z1dOdP„ Z2d„dQdR„Z3dSdT„ Z4dUdV„ Z5d‚dWdX„Z6dYdZ„ Z7d[d\„ Z8G d]d^„ d^e9ƒZ:G d_d`„ d`eƒZ;G dadb„ dbeƒZ<G dcdd„ dde=ƒZ>dee>_?G dfde„ deeƒZ@daAdgdh„ ZBdidj„ ZCd‰dldm„ZDG dndo„ doejEƒZFdpdq„ ZGdrds„ ZHdtdu„ ZIe Jdv¡ZKe Jdw¡ZLeLeKfdxdy„ZMeNdƒZOdzd{„ ZPG d|d}„ d}eNƒZQd~d„ ZRd€d�„ ZSdS )Šz…Routines to help with the creation, loading and introspection of
modules, classes, hierarchies, attributes, functions, and methods.

é    ©Úupdate_wrapperNé   )Ú_collections)Úcompaté   )Úexcc                 C   s*   t jr|  d¡} t ¡ }| | ¡ | ¡ S )Nzutf-8)r   Úpy3kÚencodeÚhashlibÚmd5ÚupdateÚ	hexdigest)ÚxÚm© r   úM/var/www/html/env/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.pyÚmd5_hex   s
   

r   c                   @   s.   e Zd ZdZdZddd„Zdd„ Zdd	„ Zd
S )Úsafe_reraiseaK  Reraise an exception after invoking some
    handler code.

    Stores the existing exception info before
    invoking so that it is maintained across a potential
    coroutine context switch.

    e.g.::

        try:
            sess.commit()
        except:
            with safe_reraise():
                sess.rollback()

    )Ú	warn_onlyÚ	_exc_infoFc                 C   ó
   || _ d S ©N)r   )Úselfr   r   r   r   Ú__init__7   ó   
zsafe_reraise.__init__c                 C   s   t  ¡ | _d S r   )ÚsysÚexc_infor   ©r   r   r   r   Ú	__enter__:   ó   zsafe_reraise.__enter__c                 C   s€   |d u r| j \}}}d | _ | jst |||¡ d S d S tjs4| j r4| j d r4td| j d | j d f ƒ d | _ t |||¡ d S )Nr   zfAn exception has occurred during handling of a previous exception.  The previous exception is:
 %s %s
r   )r   r   r   Úreraiser	   Úwarn)r   Útype_ÚvalueÚ	tracebackÚexc_typeÚ	exc_valueÚexc_tbr   r   r   Ú__exit__=   s   ÿþÿzsafe_reraise.__exit__N©F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r)   r   r   r   r   r   #   s    
r   c                 C   s>   g }| j | j| jfD ]}t|dƒr| ¡ }| |¡ q
t|ƒS )zrdecode a slice object as sent to __getitem__.

    takes into account the 2.5 __index__() method, basically.

    Ú	__index__)ÚstartÚstopÚstepÚhasattrr0   ÚappendÚtuple)ÚslcÚretr   r   r   r   Údecode_sliceQ   s   
r9   c              	   '   sl   � t | ƒ} |D ],‰ t ˆ ft ‡ fdd„tdƒ¡¡}|D ]}|| vr,|  |¡ |V   nqtdˆ  ƒ‚qd S )Nc                    s   ˆ t | ƒ S r   )Ústr)Úi©Úbaser   r   Ú<lambda>d   s    z!_unique_symbols.<locals>.<lambda>iè  z&exhausted namespace for symbol base %s)ÚsetÚ	itertoolsÚchainr   Úitertools_imapÚrangeÚaddÚ	NameError)ÚusedÚbasesÚpoolÚsymr   r<   r   Ú_unique_symbols_   s    €þ
ýþ÷rJ   c                 c   s2   � |r|| d @ }| |ƒV  ||N }|sdS dS )z6Call the given function given each nonzero bit from n.r   Nr   )ÚfnÚnÚbr   r   r   Úmap_bitso   s   €
ýrN   c                    ó   ‡ fdd„}t |ˆ ƒS )z'A signature-matching decorator factory.c                    s²   t  | ¡s	tdƒ‚t | ¡}t|d ƒ|dd…  | jf }t|ddƒ\}}t||d�}| 	t
|dd	�¡ | j|d
< d| }t||ˆ || i| jƒ}t| d| ƒj|_| |_t|| ƒS )Nznot a decoratable functionr   r   é   ÚtargetrK   )rQ   rK   F©ÚgroupedÚnamezDdef %(name)s(%(args)s):
    return %(target)s(%(fn)s, %(apply_kw)s)
Úim_func)ÚinspectÚ
isfunctionÚ	Exceptionr   Úinspect_getfullargspecr6   r+   rJ   Údictr   Úformat_argspec_plusÚ_exec_code_in_envÚgetattrÚ__defaults__Ú__wrapped__r   )rK   ÚspecÚnamesÚ	targ_nameÚfn_nameÚmetadataÚcodeÚ	decorated©rQ   r   r   Údecorate{   s$   

 
üÿÿ
zdecorator.<locals>.decorater   )rQ   rh   r   rg   r   Ú	decoratorx   s   
ri   c                 C   s   t | |ƒ || S r   )Úexec)re   Úenvrc   r   r   r   r\   –   s   
r\   c                 C   sÒ   t | tƒr| j}| }d| j|f }n|  }}d| }| d¡d }t |¡}|d d= t|dd�}||d< d	| }|td
œ}	t	||	ƒ |	| }
|j
|
_
d| dd¡d  |
_tjs^t|dƒrd||j_
|
S ||_
|
S )z´Produce a wrapping function for the given cls or classmethod.

    Rationale here is so that the __init__ method of the
    class can serve as documentation for the function.

    z˜Construct a new :class:`.%s` object. 

This constructor is mirrored as a public API function; see :func:`~%s` for a full usage and argument description.zJThis function is mirrored; see :func:`~%s` for a description of arguments.Ú.éÿÿÿÿr   FrR   rT   z5def %(name)s(%(args)s):
    return cls(%(apply_kw)s)
)ÚclsÚsymbolÚ
sqlalchemyr   Ú__func__)Ú
isinstanceÚtyper   r+   Úsplitr   rY   r[   ro   rj   r.   Úrsplitr,   Úpy2kr4   rq   )rQ   ÚlocationrK   Ú	callable_ÚdocÚlocation_namer`   rd   re   rk   rf   r   r   r   Úpublic_factory›   s>   
üÿÿÿ

üÿ

ÿr{   c                   @   ó.   e Zd Zd
dd„Zdd„ Zdd„ Zdd	„ ZdS )ÚPluginLoaderNc                 C   s   || _ i | _|| _d S r   )ÚgroupÚimplsÚauto_fn)r   r~   r€   r   r   r   r   Ì   s   
zPluginLoader.__init__c                 C   s   | j  ¡  d S r   )r   Úclearr   r   r   r   r�   Ñ   r    zPluginLoader.clearc                 C   s˜   || j v r| j | ƒ S | jr|  |¡}|r|| j |< |ƒ S zdd l}W n	 ty,   Y nw | | j|¡D ]}|j| j |< | ¡   S t d| j|f ¡‚)Nr   zCan't load plugin: %s:%s)	r   r€   Úpkg_resourcesÚImportErrorÚiter_entry_pointsr~   Úloadr   ÚNoSuchModuleError)r   rT   Úloaderr‚   Úimplr   r   r   r…   Ô   s$   


ÿÿzPluginLoader.loadc                    s   ‡ ‡fdd„}|| j |< d S )Nc                     s6   t  ˆ ¡} ˆ  d¡dd … D ]}t| |ƒ} qt| ˆƒS )Nrl   r   )r   Úimport_rt   r]   )ÚmodÚtoken©Ú
modulepathÚobjnamer   r   r…   ì   s   

z#PluginLoader.register.<locals>.load)r   )r   rT   r�   rŽ   r…   r   rŒ   r   Úregisterë   s   zPluginLoader.registerr   )r+   r,   r-   r   r�   r…   r�   r   r   r   r   r}   Ë   s
    
r}   c                 C   s˜   |du }|r	t ƒ }| j dd¡}|ot|tjƒot|jtjƒ}|r2t|ƒ\}}| 	|¡ |s2|s2dS |r6|rE| j
D ]}t||ƒdu rD nq9| d¡ |S )aÝ  Return the full set of inherited kwargs for the given `cls`.

    Probes a class's __init__ method, collecting all named arguments.  If the
    __init__ defines a \**kwargs catch-all, then the constructor is presumed
    to pass along unrecognized keywords to its base classes, and the
    collection process is repeated recursively on each of the bases.

    Uses a subset of inspect.getargspec() to cut down on method overhead.
    No anonymous tuple arguments please !

    Nr   Fr   )r?   Ú__dict__Úgetrr   ÚtypesÚFunctionTypeÚ__code__ÚCodeTypeÚinspect_func_argsr   Ú	__bases__Úget_cls_kwargsÚdiscard)rn   Ú_setÚtoplevelÚctrÚhas_initra   Úhas_kwÚcr   r   r   r˜   õ   s*   
ÿý

ÿ
r˜   )ÚCO_VARKEYWORDSc                 C   s8   | j }|j}|j}t|d |… ƒ}t|jt@ ƒ}||fS r   )r”   Úco_argcountÚco_varnamesÚlistÚboolÚco_flagsr    )rK   ÚcoÚnargsra   Úargsrž   r   r   r   r–   !  s   r–   c                 C   s   t  | ¡\}}}}|t|ƒfS r   )r   Úinspect_getargspecr¤   )rK   ra   Ú_rž   r   r   r   r–   ,  s   c                 C   s   t  | ¡d S )zƒReturn the set of legal kwargs for the given `func`.

    Uses getargspec so is safe to call for methods, functions,
    etc.

    r   )r   r©   ©Úfuncr   r   r   Úget_func_kwargs1  s   r­   Fc                 C   s  t  | ¡rtd|  ƒ‚t  | ¡r.|r)|r)t | ¡}t |jdd… |j|j	|j
¡S t | ¡S t  | ¡rV|rP|s:| jrPt | j¡}t |jdd… |j|j	|j
¡S t | j¡S t  | ¡rct| j|dd�S t| dƒrnt | j¡S t| dƒr†t  | j¡r€t| j|d�S td	|  ƒ‚td	|  ƒ‚)
zþReturn the argument signature for any callable.

    All pure-Python callables are accepted, including
    functions, methods, classes, objects with __call__;
    builtins and other edge cases like functools.partial() objects
    raise a TypeError.

    zCan't inspect builtin: %sr   NT)Úno_selfÚ_is_initrq   Ú__call__)r®   zCan't inspect callable: %s)rV   Ú	isbuiltinÚ	TypeErrorrW   r   r©   ÚArgSpecr¨   ÚvarargsÚkeywordsÚdefaultsÚismethodÚ__self__rq   ÚisclassÚget_callable_argspecr   r4   r°   )rK   r®   r¯   r`   r   r   r   rº   <  s6   
	

ÿ

ÿ
ÿ

rº   Tc           
      C   sv  t  | ¡rt  | ¡}n| }t j|Ž }|d r|d d }n|d r(d|d  }nd}t jrat  |d |d |d d|d ¡}d}|d rL|t|d ƒ7 }|d rX|t|d ƒ7 }|d |d  }nt  |d |d |d ¡}d}|d r||t|d ƒ7 }|d }|r‹|d| d… }nd}t j||d |d |d	d
„ d�}	|r§t||||	d�S t|dd… ||dd… |	dd… d�S )aµ  Returns a dictionary of formatted, introspected function arguments.

    A enhanced variant of inspect.formatargspec to support code generation.

    fn
       An inspectable callable or tuple of inspect getargspec() results.
    grouped
      Defaults to True; include (parens, around, argument) lists

    Returns:

    args
      Full inspect.formatargspec for fn
    self_arg
      The name of the first positional argument, varargs[0], or None
      if the function defines no positional arguments.
    apply_pos
      args, re-written in calling rather than receiving syntax.  Arguments are
      passed positionally.
    apply_kw
      Like apply_pos, except keyword-ish args are passed as keywords.

    Example::

      >>> format_argspec_plus(lambda self, a, b, c=3, **d: 123)
      {'args': '(self, a, b, c=3, **d)',
       'self_arg': 'self',
       'apply_kw': '(self, a, b, c=c, **d)',
       'apply_pos': '(self, a, b, c, **d)'}

    r   r   z%s[0]Nr   é   rP   r   c                 S   s   d|  S )Nú=r   )r   r   r   r   r>   ®  s    z%format_argspec_plus.<locals>.<lambda>)Úformatvalue)r¨   Úself_argÚ	apply_posÚapply_kwrm   )r   ÚcallablerY   Úinspect_formatargspecr	   ÚlenrZ   )
rK   rS   r`   r¨   r¾   r¿   Únum_defaultsÚ	name_argsÚdefaulted_valsrÀ   r   r   r   r[   f  s^   
 
ÿûü


ür[   c                 C   sV   | t ju r|r	dp
d}nzt| |d�W S  ty"   |rdpd}Y nw td|||d�S )a  format_argspec_plus with considerations for typical __init__ methods

    Wraps format_argspec_plus with error handling strategies for typical
    __init__ cases::

      object.__init__ -> (self)
      other unreflectable (usually C) -> (self, *args, **kwargs)

    z(self)r   rR   z(self, *args, **kwargs)zself, *args, **kwargs)r¾   r¨   r¿   rÀ   )Úobjectr   r[   r²   rZ   )ÚmethodrS   r¨   r   r   r   Úformat_argspec_initÀ  s   

ÿýÿrÉ   c                 C   sJ   zt  | ¡W S  ty$   | tju rdgdddf Y S dgdddf Y S w )zúinspect.getargspec with considerations for typical __init__ methods

    Wraps inspect.getargspec with error handling for typical __init__ cases::

      object.__init__ -> (self)
      other unreflectable (usually C) -> (self, *args, **kwargs)

    r   Nr¨   Úkwargs)r   r©   r²   rÇ   r   )rÈ   r   r   r   Úgetargspec_initØ  s   	
ürË   c                 C   s   t | tjƒr| js| jS | S )zSAdjust the incoming callable such that a 'self' argument is not
    required.

    )rr   r’   Ú
MethodTyper¸   rq   )Úfunc_or_clsr   r   r   Úunbound_method_to_callableê  s   rÎ   r   c              	      s  |du rˆg}nt  |¡}tƒ ‰ g }t  ¡ }d}t|ƒD ]f\}}zt |j¡\}	}
}}W n	 ty5   Y qw |r<t	|ƒp=d}|dkr]|
rF|
}|rS| 
|	d| … ¡ n| 
|	dd… ¡ n| ‡ fdd„|	d| … D ƒ¡ |r‚| dd„ t|	| d… |ƒD ƒ¡ qg }| 
‡fdd„|D ƒ¡ |dur§tˆ|ƒr§| 
d	d„ tˆ|ƒD ƒ¡ | ¡ D ]+\}}||v r´q«ztˆ|ˆ ƒ}|ˆ urÌ||krÌ| d
||f ¡ W q« tyÖ   Y q«w |�r|D ]'\}}ztˆ|ˆ ƒ}|ˆ urø||krø| d
||f ¡ W qÜ t�y   Y qÜw dˆjjd |¡f S )z}Produce a __repr__() based on direct association of the __init__()
    specification vs. same-named attributes present.

    Nr   r   c                    s   g | ]}|ˆ f‘qS r   r   ©Ú.0Úarg)Úmissingr   r   Ú
<listcomp>  ó    z generic_repr.<locals>.<listcomp>c                 S   s   g | ]\}}||f‘qS r   r   )rÐ   rÑ   Údefaultr   r   r   rÓ     s    ÿÿc                 3   s    � | ]}t tˆ |d ƒƒV  qd S r   )Úreprr]   rÏ   ©Úobjr   r   Ú	<genexpr>#  s   € zgeneric_repr.<locals>.<genexpr>c                 S   s   g | ]}t |ƒ‘qS r   ©rÖ   )rÐ   Úvalr   r   r   rÓ   &  rÔ   z%s=%rz%s(%s)ú, )r   Úto_listrÇ   ÚOrderedDictÚ	enumerater   r©   r   r²   rÃ   Úextendr   Úzipr4   r]   Úitemsr5   rX   Ú	__class__r+   Újoin)rØ   Úadditional_kwÚ
to_inspectÚ
omit_kwargÚpos_argsÚkw_argsÚvargsr;   ÚinspÚ_argsÚ_vargsÚvkwr¶   Údefault_lenÚoutputrÑ   ÚdefvalrÛ   r   )rÒ   rØ   r   Úgeneric_reprö  st   
ÿÿÿþÿ€€ÿ€ÿrò   c                   @   s6   e Zd ZdZdZdd„ Zdd„ Zddd	„Zd
d„ ZdS )Úportable_instancemethodz_Turn an instancemethod into a (parent, name) pair
    to produce a serializable callable.

    )rQ   rT   rÊ   Ú__weakref__c                 C   s   | j | j| jdœS )N©rQ   rT   rÊ   rõ   r   r   r   r   Ú__getstate__F  s   ýz$portable_instancemethod.__getstate__c                 C   s&   |d | _ |d | _| dd¡| _d S )NrQ   rT   rÊ   r   )rQ   rT   r‘   rÊ   )r   Ústater   r   r   Ú__setstate__M  s   

z$portable_instancemethod.__setstate__r   c                 C   s   |j | _|j| _|| _d S r   )r¸   rQ   r+   rT   rÊ   )r   ÚmethrÊ   r   r   r   r   R  s   
z portable_instancemethod.__init__c                 O   s$   |  | j¡ t| j| jƒ|i |¤ŽS r   )r   rÊ   r]   rQ   rT   )r   rÑ   Úkwr   r   r   r°   W  s   z portable_instancemethod.__call__N©r   )	r+   r,   r-   r.   r/   rö   rø   r   r°   r   r   r   r   ró   >  s    
ró   c                    s   t jrt| tjƒrtƒ S | h‰ t| jƒ}|r|| ¡ }t jr/t|tjƒr$q‡ fdd„|jD ƒ}n
‡ fdd„|jD ƒ}|D ]}| 	|¡ ˆ  
|¡ q;t jrW|jdksUt|dƒsVqn|jdksat|dƒsbq‡ fdd„| ¡ D ƒD ]}| 	|¡ ˆ  
|¡ qm|stˆ ƒS )	a†  Return an unordered sequence of all classes related to cls.

    Traverses diamond hierarchies.

    Fibs slightly: subclasses of builtin types are not returned.  Thus
    class_hierarchy(class A(object)) returns (A, object), not A plus every
    class systemwide that derives from object.

    Old-style classes are discarded and hierarchies rooted on them
    will not be descended.

    c                 3   s(   � | ]}|ˆ vrt |tjƒs|V  qd S r   )rr   r’   Ú	ClassType©rÐ   rª   ©Úhierr   r   rÙ   t  s   € þýz"class_hierarchy.<locals>.<genexpr>c                 3   s   � | ]	}|ˆ vr|V  qd S r   r   rý   rþ   r   r   rÙ   z  ó   € ÚbuiltinsÚ__subclasses__Ú__builtin__c                    s   g | ]}|ˆ vr|‘qS r   r   rý   rþ   r   r   rÓ   ‰  s    z#class_hierarchy.<locals>.<listcomp>)r   rv   rr   r’   rü   r£   Ú__mro__Úpopr—   r5   rD   r	   r,   r4   r  )rn   ÚprocessrŸ   rG   rM   Úsr   rþ   r   Úclass_hierarchy\  s<   

þ
ÿÿ
är  c                 c   sB   � t | ƒ}|D ]}| jD ]}||jv r||j| fV   nqqdS )zÖiterate all the keys and attributes associated
       with a class, without using getattr().

       Does not use getattr() so that class-sensitive
       descriptors (i.e. property.__get__()) are not called.

    N)Údirr  r�   )rn   ÚkeysÚkeyrŸ   r   r   r   Úiterate_attributes�  s   €

þ€þr  ú
self.proxyc              	      s$  |r|}nˆdu rd‰‡ ‡fdd„t |ƒD ƒ}|D ]v}zt||ƒ}t|dƒs(W qt|d|ƒ}W n	 ty8   Y qw zt |¡}	t |	d ¡}
t |	d dd… ¡}W n ty_   d	}
d
}Y nw dtƒ  }|durm||ipni }t 	||¡ z|j
|| _
W n	 ty†   Y nw tˆ ||| ƒ qdS )z9Automates delegation of __specials__ for a proxying type.N)r/   Ú__del__Ú__getattribute__Ú__metaclass__rö   rø   c                    s6   g | ]}|  d ¡r| d ¡rtˆ |ƒs|ˆvr|‘qS )Ú__)Ú
startswithÚendswithr4   ©rÐ   r   ©Úinto_clsÚskipr   r   rÓ   µ  s    üûúúz0monkeypatch_proxied_specials.<locals>.<listcomp>r°   rU   r   r   z(self, *args, **kw)z(*args, **kw)z?def %(method)s%(fn_args)s: return %(name)s.%(method)s%(d_args)s)r	  r]   r4   ÚAttributeErrorr   r©   rÂ   r²   ÚlocalsÚexec_r^   Úsetattr)r  Úfrom_clsr  ÚonlyrT   Úfrom_instanceÚdundersrÈ   rK   r`   Úfn_argsÚd_argsÚpyrk   r   r  r   Úmonkeypatch_proxied_specialsŸ  sJ   
þ

ÿ
þÿÿÿår#  c                 C   s   t | d| ƒt |d|ƒu S )z;Return True if the two methods are the same implementation.rq   )r]   )Úmeth1Úmeth2r   r   r   Úmethods_equivalentÞ  s   ÿr&  c                 C   sj  |s|st dƒ‚t|tƒrt| |ƒr| S t|pdd„ t|ƒD ƒƒ}tt| ƒƒ}tj}t|tƒr2|}n|s;tƒ }tj}nt|ƒ}|| |¡|ƒrI| S t| t	ƒsc|tju rUdpVd}t d| |d 
|¡f ƒ‚G dd	„ d	tƒ}|rsd
|j |_tƒ }	t| ƒD ](\}
}|
|vrˆt d|
 ƒ‚t |¡s•t d|
|f ƒ‚t||
t|ƒƒ |	 |
¡ qz||	|ƒrª|S t dd 
||	 ¡ ƒ‚)aŽ  Ensure basic interface compliance for an instance or dict of callables.

    Checks that ``obj`` implements public methods of ``cls`` or has members
    listed in ``methods``. If ``required`` is not supplied, implementing at
    least one interface method is sufficient. Methods present on ``obj`` that
    are not in the interface are ignored.

    If ``obj`` is a dict and ``dict`` does not meet the interface
    requirements, the keys of the dictionary are inspected. Keys present in
    ``obj`` that are not in the interface will raise TypeErrors.

    Raises TypeError if ``obj`` does not meet the interface criteria.

    In all passing cases, an object with callable members is returned.  In the
    simple case, ``obj`` is returned as-is; if dict processing kicks in then
    an anonymous class is returned.

    obj
      A type, instance, or dictionary of callables.
    cls
      Optional, a type.  All public methods of cls are considered the
      interface.  An ``obj`` instance of cls will always pass, ignoring
      ``required``..
    methods
      Optional, a sequence of method names to consider as the interface.
    required
      Optional, a sequence of mandatory implementations. If omitted, an
      ``obj`` that provides at least one interface method is considered
      sufficient.  As a convenience, required may be a type, in which case
      all public methods of the type are required.

    z2a class or collection of method names are requiredc                 S   s   g | ]	}|  d ¡s|‘qS )rª   )r  r  r   r   r   rÓ     s    z as_interface.<locals>.<listcomp>zany ofzall ofz%r does not implement %s: %srÜ   c                   @   s   e Zd ZdZdS )z(as_interface.<locals>.AnonymousInterfacezA callable-holding shell.N)r+   r,   r-   r.   r   r   r   r   ÚAnonymousInterface$  s    r'  Ú	Anonymousz%r: unknown in this interfacez%r=%r is not callablez,dictionary does not contain required keys %s)r²   rr   rs   r?   r	  ÚoperatorÚgeÚgtÚintersectionrZ   rä   rÇ   r+   Údictlike_iteritemsr   rÁ   r  ÚstaticmethodrD   )rØ   rn   ÚmethodsÚrequiredÚ	interfaceÚimplementedÚcompliesÚ	qualifierr'  ÚfoundrÈ   rˆ   r   r   r   Úas_interfaceæ  sP   !

ÿÿ

ÿÿr6  c                   @   s6   e Zd ZdZddd„Zdd„ Zdd„ Zed	d
„ ƒZdS )Úmemoized_propertyz2A read-only @property that is only evaluated once.Nc                 C   s   || _ |p|j| _|j| _d S r   )Úfgetr.   r+   )r   r8  ry   r   r   r   r   ?  s   zmemoized_property.__init__c                 C   s&   |d u r| S |   |¡ |j| j< }|S r   )r8  r�   r+   )r   rØ   rn   Úresultr   r   r   Ú__get__D  s   zmemoized_property.__get__c                 C   s   t  || j¡ d S r   )r7  Úresetr+   )r   rØ   r   r   r   Ú_resetJ  s   zmemoized_property._resetc                 C   s   |j  |d ¡ d S r   )r�   r  )rn   rØ   rT   r   r   r   r;  M  s   zmemoized_property.resetr   )	r+   r,   r-   r.   r   r:  r<  Úclassmethodr;  r   r   r   r   r7  <  s    
r7  c                    rO   )zàDecorate a method memoize its return value.

    Best applied to no-arg methods: memoization is not sensitive to
    argument values, and will always return the same value even when
    called with different arguments.

    c                    sB   ˆ| g|¢R i |¤Ž‰ ‡ fdd„}ˆj |_ ˆj|_|| jˆj < ˆ S )Nc                     ó   ˆ S r   r   ©Úarú   ©r9  r   r   Úmemo^  ó   z6memoized_instancemethod.<locals>.oneshot.<locals>.memo)r+   r.   r�   )r   r¨   rú   rB  ©rK   rA  r   Úoneshot[  s   z(memoized_instancemethod.<locals>.oneshotr   )rK   rE  r   rD  r   Úmemoized_instancemethodR  s   	
rF  c                   @   s2   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ ZdS )Ú!group_expirable_memoized_propertyz?A family of @memoized_properties that can be expired in tandem.r   c                 C   s   g | _ |r| j  |¡ d S d S r   )Ú
attributesrà   )r   rH  r   r   r   r   l  s   ÿz*group_expirable_memoized_property.__init__c                 C   s"   |j }| jD ]}| |d¡ qdS )z.Expire all memoized properties for *instance*.N)r�   rH  r  )r   ÚinstanceÚstashÚ	attributer   r   r   Úexpire_instanceq  s   
ÿz1group_expirable_memoized_property.expire_instancec                 C   ó   | j  |j¡ t|ƒS r   )rH  r5   r+   r7  ©r   rK   r   r   r   r°   w  ó   z*group_expirable_memoized_property.__call__c                 C   rM  r   )rH  r5   r+   rF  rN  r   r   r   rÈ   {  rO  z(group_expirable_memoized_property.methodNrû   )r+   r,   r-   r.   r   rL  r°   rÈ   r   r   r   r   rG  i  s    
rG  c                   @   s$   e Zd ZdZdZdd„ Zdd„ ZdS )ÚMemoizedSlotszÇApply memoized items to an object using a __getattr__ scheme.

    This allows the functionality of memoized_property and
    memoized_instancemethod to be available to a class using __slots__.

    r   c                 C   s   t |ƒ‚r   )r  )r   r  r   r   r   Ú_fallback_getattrŠ  ó   zMemoizedSlots._fallback_getattrc                    s‚   ˆ  d¡r	tˆƒ‚tˆdˆ ƒr tˆdˆ ƒƒ }tˆˆ|ƒ |S tˆdˆ ƒr<tˆdˆ ƒ‰ ‡ ‡‡fdd„}ˆ j|_|S ˆ ˆ¡S )NÚ	_memoizedz_memoized_attr_%sz_memoized_method_%sc                     s:   ˆ| i |¤Ž‰ ‡ fdd„}ˆj |_ ˆj|_tˆˆ|ƒ ˆ S )Nc                     r>  r   r   r?  rA  r   r   rB  š  rC  z8MemoizedSlots.__getattr__.<locals>.oneshot.<locals>.memo)r+   r.   r  )r¨   rú   rB  ©rK   r  r   rA  r   rE  —  s   z*MemoizedSlots.__getattr__.<locals>.oneshot)r  r  r4   r]   r  r.   rQ  )r   r  r$   rE  r   rT  r   Ú__getattr__�  s   

zMemoizedSlots.__getattr__N)r+   r,   r-   r.   r/   rQ  rU  r   r   r   r   rP  €  s
    rP  c                    s   ‡ ‡fdd„}|S )Nc                    sn   ˆ  d¡}t d |dd… ¡tƒ tƒ |d g¡}t||d ƒ}t|| j| ƒ ˆ r5t	|dƒr5|j
 | j¡ | S )Nrl   r   rm   Ú__all__)rt   r   r‰   rä   Úglobalsr  r]   r  r+   r4   rV  r5   )rØ   ÚtokensrŠ   ©Ú
add_to_allÚ
modulenamer   r   rh   ©  s   
 ÿz dependency_for.<locals>.decorater   )r[  rZ  rh   r   rY  r   Údependency_for¨  s   r\  c                   @   sF   e Zd ZdZdd„ Zdd„ Zedd„ ƒZeƒ Z	i Z
G dd	„ d	eƒZd
S )ÚdependenciesaÇ  Apply imported dependencies as arguments to a function.

    E.g.::

        @util.dependencies(
            "sqlalchemy.sql.widget",
            "sqlalchemy.engine.default"
        );
        def some_func(self, widget, default, arg1, arg2, **kw):
            # ...

    Rationale is so that the impact of a dependency cycle can be
    associated directly with the few functions that cause the cycle,
    and not pollute the module-level namespace.

    c              
   G   sD   g | _ |D ]}| d¡}| j  t d |dd… ¡|d ¡¡ qd S )Nrl   r   rm   )Úimport_depsrt   r5   r]  Ú_importlaterrä   )r   ÚdepsÚdeprX  r   r   r   r   É  s   
ÿþzdependencies.__init__c                 C   sÒ   | j }t |¡}t|d ƒ}|d dv }tt|ƒƒD ]}d| |d ||r'dnd < qt|dd�}|D ]	}||r:dnd= q3||d d d …< t|dd�}	d|	d |d	 d
œ }
t|
tƒ ƒ}t	|d|ƒj
|_
t||ƒS )Nr   )r   rn   zimport_deps[%r]r   FrR   z!lambda %(args)s: fn(%(apply_kw)s)r¨   rÀ   )r¨   rÀ   rU   )r^  r   rY   r£   rC   rÃ   r[   Úevalr  r]   r^   r   )r   rK   r^  r`   Ú	spec_zeroÚhasselfr;   Ú
inner_specÚimpnameÚ
outer_specre   rf   r   r   r   r°   Ñ  s$   
þ
zdependencies.__call__c                 C   s(   t tjƒD ]}|j |¡r| ¡  qd S r   )r£   r]  Ú_unresolvedÚ
_full_pathr  Ú_resolve)rn   Úpathr   r   r   r   Úresolve_allì  s
   €þzdependencies.resolve_allc                   @   sN   e Zd Zeƒ Zi Zdd„ Zdd„ Zedd„ ƒZ	e
dd„ ƒZd	d
„ Zdd„ ZdS )zdependencies._importlaterc                 C   s8   |d | }|t jv rt j| S t | ¡ t j|< }|S ©Nrl   )r]  Ú_by_keyrÇ   Ú__new__)rn   rk  Úaddtlr  Úimpr   r   r   ro  ú  s
   

z!dependencies._importlater.__new__c                 C   s   || _ || _tj | ¡ d S r   )Ú_il_pathÚ	_il_addtlr]  rh  rD   )r   rk  rp  r   r   r   r     s   z"dependencies._importlater.__init__c                 C   s   | j d | j S rm  )rr  rs  r   r   r   r   ri    s   z$dependencies._importlater._full_pathc                 C   s,   | t jv rtd| j| jf ƒ‚t| j| jƒS )Nz<importlater.resolve_all() hasn't been called (this is %s %s))r]  rh  rƒ   rr  rs  r]   Ú_initial_importr   r   r   r   Úmodule  s   

þÿz dependencies._importlater.modulec                 C   s,   t j | ¡ t | jtƒ tƒ | jg¡| _	d S r   )
r]  rh  r™   r   r‰   rr  rW  r  rs  rt  r   r   r   r   rj    s   
ÿz"dependencies._importlater._resolvec                 C   sV   |dkrt d| j ƒ‚zt| j|ƒ}W n ty#   td| j|f ƒ‚w || j|< |S )Nru  zCould not resolve module %szModule %s has no attribute '%s')rƒ   ri  r]   ru  r  r�   )r   r  Úattrr   r   r   rU    s   ÿÿÿ
z%dependencies._importlater.__getattr__N)r+   r,   r-   r?   rh  rn  ro  r   Úpropertyri  r7  ru  rj  rU  r   r   r   r   r_  õ  s    


r_  N)r+   r,   r-   r.   r   r°   r=  rl  r?   rh  rn  rÇ   r_  r   r   r   r   r]  ·  s    
r]  c                 C   sD   t | tjƒr|  ¡  ¡ } | dv rdS | dv rdS td|  ƒ‚t| ƒS )N)ÚtrueÚyesÚonÚyÚtÚ1T)ÚfalseÚnoÚoffrL   ÚfÚ0FzString is not true/false: %r)rr   r   Ústring_typesÚstripÚlowerÚ
ValueErrorr¤   r×   r   r   r   Úasbool,  s   r‡  c                     s   ‡ fdd„}|S )zqReturn a callable that will evaluate a string as
    boolean, or one of a set of "alternate" string values.

    c                    s   | ˆ v r| S t | ƒS r   )r‡  r×   ©Útextr   r   Úbool_or_value>  s   z"bool_or_str.<locals>.bool_or_valuer   )r‰  rŠ  r   rˆ  r   Úbool_or_str8  s   r‹  c                 C   s   | du r| S t | ƒS )zCoerce to integer.N)Úint)r$   r   r   r   ÚasintG  s   r�  c                 C   sb   || v r+t | | |ƒs-| | dur/|tu r!|r!t| | ƒ| |< dS || | ƒ| |< dS dS dS dS )zµIf 'key' is present in dict 'kw', coerce its value to type 'type\_' if
    necessary.  If 'flexi_bool' is True, the string '0' is considered false
    when coercing to boolean.
    N)rr   r¤   r‡  )rú   r  r#   Ú
flexi_boolr   r   r   Úcoerce_kw_typeO  s
   "ür�  c                    s4   t |ƒ}| ‡ fdd„| |¡D ƒ¡ ||i |¤ŽS )z„Instantiate cls using the __dict__ of obj as constructor arguments.

    Uses inspect to match the named arguments of ``cls``.

    c                 3   s(   � | ]}|ˆ j v r|ˆ j | fV  qd S r   )r�   )rÐ   Úkr×   r   r   rÙ   d  s   € ÿz#constructor_copy.<locals>.<genexpr>)r˜   r   Ú
difference)rØ   rn   r¨   rú   ra   r   r×   r   Úconstructor_copy\  s
   ÿr’  c                     s&   t j ¡ ‰t d¡‰ ‡ ‡fdd„} | S )z%Return a threadsafe counter function.r   c                      s&   ˆ  ¡  z	tˆ ƒW ˆ ¡  S ˆ ¡  w r   )ÚacquireÚnextÚreleaser   ©ÚcounterÚlockr   r   Ú_nextq  s   zcounter.<locals>._next)r   Ú	threadingÚLockr@   Úcount)r™  r   r–  r   r—  j  s   

r—  c                 C   s”   t | dƒr| jdurt| jtƒrtS | jS t| tƒrtpt}|| tƒr%tS || tƒr,tS || tƒr3tS t | dƒr:tS t | dƒrAtS t | dƒrHtS |S )zÄGiven an instance or class, guess if it is or is acting as one of
    the basic collection types: list, set and dict.  If the __emulates__
    property is present, return that preferentially.
    Ú__emulates__Nr5   rD   r?   )r4   r�  Ú
issubclassr?   rr   rs   r£   rZ   )ÚspecimenrÕ   Úisar   r   r   Úduck_type_collection{  s(   
ÿ





r¡  c                 C   sX   t | |ƒr| S t |tƒr t d|d dd„ |D ƒ¡t| ƒf ¡‚t d||t| ƒf ¡‚)Nz8Argument '%s' is expected to be one of type %s, got '%s'z or c                 s   s   � | ]}d | V  qdS )z'%s'Nr   )rÐ   r@  r   r   r   rÙ   £  s   € z"assert_arg_type.<locals>.<genexpr>z6Argument '%s' is expected to be of type '%s', got '%s')rr   r6   r   ÚArgumentErrorrä   rs   )rÑ   ÚargtyperT   r   r   r   Úassert_arg_typeœ  s   

ÿÿÿÿr¤  c                    s¼   t jrtˆ dƒrtˆ  ¡ ƒS ntˆ dƒrˆ  ¡ S tˆ dƒr#tˆ  ¡ ƒS tˆ dtˆ ddƒƒ‰ˆdu r7tdˆ  ƒ‚tˆ dƒrF‡ ‡fdd	„}|ƒ S tˆ d
ƒrXt‡fdd„ˆ  	¡ D ƒƒS tdˆ  ƒ‚)z?Return a (key, value) iterator for almost any dict-like object.râ   Ú	iteritemsÚ__getitem__r‘   NzObject '%r' is not dict-likeÚiterkeysc                  3   s"   � ˆ   ¡ D ]	} | ˆ| ƒfV  qd S r   )r§  )r  ©ÚdictlikeÚgetterr   r   Úiterator¾  s   €ÿz$dictlike_iteritems.<locals>.iteratorr
  c                 3   s   � | ]	}|ˆ |ƒfV  qd S r   r   )rÐ   r  )rª  r   r   rÙ   Ä  r   z%dictlike_iteritems.<locals>.<genexpr>)
r   r	   r4   r£   râ   r¥  Úiterr]   r²   r
  )r©  r«  r   r¨  r   r-  ¬  s"   
ÿ



r-  c                       ó(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )ÚclasspropertyaA  A decorator that behaves like @property except that operates
    on classes rather than instances.

    The decorator is currently special when using the declarative
    module, but note that the
    :class:`~.sqlalchemy.ext.declarative.declared_attr`
    decorator should be used for this purpose with declarative.

    c                    s*   t t| ƒj|g|¢R i |¤Ž |j| _d S r   )Úsuperr®  r   r.   )r   r8  rÑ   rú   ©rã   r   r   r   Ô  s   zclassproperty.__init__c                 C   s
   |   |¡S r   )r8  )Údescr   rn   r   r   r   r:  Ø  r   zclassproperty.__get__)r+   r,   r-   r.   r   r:  Ú__classcell__r   r   r°  r   r®  É  s    
r®  c                   @   s   e Zd Zdd„ Zdd„ ZdS )Úhybridpropertyc                 C   r   r   r«   ©r   r¬   r   r   r   r   Ý  r   zhybridproperty.__init__c                 C   s*   |d u r|   |¡}| j j|_|S |   |¡S r   )r¬   r.   )r   rI  ÚownerÚclsvalr   r   r   r:  à  s
   


zhybridproperty.__get__N)r+   r,   r-   r   r:  r   r   r   r   r³  Ü  s    r³  c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )Úhybridmethodz/Decorate a function as cls- or instance- level.c                 C   r   r   r«   r´  r   r   r   r   ì  r   zhybridmethod.__init__c                 C   s&   |d u r| j  ||j¡S | j  ||¡S r   )r¬   r:  rã   )r   rI  rµ  r   r   r   r:  ï  s   zhybridmethod.__get__N)r+   r,   r-   r.   r   r:  r   r   r   r   r·  é  s    r·  c                   @   r|   )Ú_symbolNc                 C   s@   t |tjƒsJ ‚|du rt|ƒ}t t|¡}||_|r||_|S )zConstruct a new named symbol.N)	rr   r   rƒ  ÚhashrŒ  ro  r¸  rT   r.   )r   rT   ry   Ú	canonicalÚvr   r   r   ro  ÷  s   z_symbol.__new__c                 C   s   t | jdt| ƒffS )Nr   )ro   rT   rŒ  r   r   r   r   Ú
__reduce__  s   z_symbol.__reduce__c                 C   s   t | ƒS r   rÚ   r   r   r   r   Ú__str__  rR  z_symbol.__str__c                 C   s
   d| j  S )Nz
symbol(%r))rT   r   r   r   r   Ú__repr__  r   z_symbol.__repr__©NN)r+   r,   r-   ro  r¼  r½  r¾  r   r   r   r   r¸  ö  s
    
r¸  ro   c                   @   s(   e Zd ZdZi Zej ¡ Zddd„Z	dS )ro   a¶  A constant symbol.

    >>> symbol('foo') is symbol('foo')
    True
    >>> symbol('foo')
    <symbol 'foo>

    A slight refinement of the MAGICCOOKIE=object() pattern.  The primary
    advantage of symbol() is its repr().  They are also singletons.

    Repeated calls of symbol('name') will all return the same instance.

    The optional ``doc`` argument assigns to ``__doc__``.  This
    is strictly so that Sphinx autoattr picks up the docstring we want
    (it doesn't appear to pick up the in-module docstring if the datamember
    is in a different module - autoattribute also blows up completely).
    If Sphinx fixes/improves this then we would no longer need
    ``doc`` here.

    Nc                 C   sR   | j  ¡  z| j |¡}|d u rt|||ƒ | j|< }|W tj  ¡  S tj  ¡  w r   )Ú_lockr“  Úsymbolsr‘   r¸  ro   r•  )rn   rT   ry   rº  rI   r   r   r   ro  (  s   
zsymbol.__new__r¿  )
r+   r,   r-   r.   rÁ  r   rš  r›  rÀ  ro  r   r   r   r   ro     s
    
c                 C   s   t | _ t d7 a dS )zÞAssign a '_creation_order' sequence to the given instance.

    This allows multiple instances to be sorted in order of creation
    (typically within a single thread; the counter is not particularly
    threadsafe).

    r   N)Ú_creation_order)rI  r   r   r   Úset_creation_order6  s   	rÃ  c                 O   s>   z| |i |¤ŽW S  t y   tdt ¡ dd…  ƒ Y dS w )zXexecutes the given function, catches all exceptions and converts to
    a warning.

    z%s('%s') ignoredr   r   N)rX   r"   r   r   )r¬   r¨   rÊ   r   r   r   Úwarn_exceptionC  s
   ÿrÄ  é   c                 C   s<   zt | ƒ|krd| d|…  W S | W S  ty   |  Y S w )Nz%s...r   )rÃ   r²   )r$   Úlen_r   r   r   Úellipses_stringN  s   ÿrÇ  c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )Ú_hash_limit_stringa/  A string subclass that can only be hashed on a maximum amount
    of unique values.

    This is used for warnings so that we can send out parameterized warnings
    without the __warningregistry__ of the module,  or the non-overridable
    "once" registry within warnings.py, overloading memory,


    c                    s@   || d|  }t t| ƒ | |¡}td|t|ƒ| f ƒ|_|S )Nz6 (this warning may be suppressed after %d occurrences)z%s_%d)r¯  rÈ  ro  r¹  Ú_hash)rn   r$   Únumr¨   Úinterpolatedr   r°  r   r   ro  c  s   ÿz_hash_limit_string.__new__c                 C   s   | j S r   )rÉ  r   r   r   r   Ú__hash__k  s   z_hash_limit_string.__hash__c                 C   s   t | ƒt |ƒkS r   )r¹  )r   Úotherr   r   r   Ú__eq__n  s   z_hash_limit_string.__eq__)r+   r,   r-   r.   ro  rÌ  rÎ  r²  r   r   r°  r   rÈ  X  s
    
rÈ  c                 C   s   t j| tjdd� dS )zdIssue a warning.

    If msg is a string, :class:`.exc.SAWarning` is used as
    the category.

    r   ©Ú
stacklevelN)Úwarningsr"   r   Ú	SAWarning)Úmsgr   r   r   r"   r  s   r"   c                 C   s&   |rt | d|ƒ} tj| tjdd� dS )z\Issue a warning with a parameterized string, limiting the number
    of registrations.

    é
   r   rÏ  N)rÈ  rÑ  r"   r   rÒ  )rÓ  r¨   r   r   r   Úwarn_limited|  s   rÕ  c                    s   | g‰ ‡ fdd„}|S )zNDecorate the given function to be a no-op after it is called exactly
    once.c                     s   ˆ rˆ   ¡ }|| i |¤ŽS d S r   )r  )rÑ   rú   Úonce_fn©Úoncer   r   ÚgoŒ  s   þzonly_once.<locals>.gor   )rK   rÙ  r   r×  r   Ú	only_once†  s   rÚ  z%sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.pyzunit(?:2|test2?/)c                 C   sˆ   d}t | ƒd }||kr"| | | ¡r"|d7 }||kr"| | | ¡s||kr<| | | ¡r<|d8 }||kr<| | | ¡s-| ||d … S )at  Chop extraneous lines off beginning and end of a traceback.

    :param tb:
      a list of traceback lines as returned by ``traceback.format_stack()``

    :param exclude_prefix:
      a regular expression object matching lines to skip at beginning of
      ``tb``

    :param exclude_suffix:
      a regular expression object matching lines to skip at end of ``tb``
    r   r   )rÃ   Úsearch)ÚtbÚexclude_prefixÚexclude_suffixr1   Úendr   r   r   Úchop_traceback˜  s   ÿÿrà  c                 C   s$   d|  }t ƒ  ¡ }t||ƒ |d S )Nz&def set(obj, value):    obj.%s = valuer?   )r  Úcopyrj   )Úattrnamere   rk   r   r   r   Ú
attrsetter±  s   

rã  c                       r­  )ÚEnsureKWArgTypezYApply translation of functions to accept \**kw arguments if they
    don't already.

    c           
         sr   | j }|r-|D ]%}t ||¡}|r,|| }t |¡}|js,|  |¡ ||< }	t| ||	ƒ qtt	| ƒ 
|||¡ d S r   )Úensure_kwargÚreÚmatchr   r©   rµ   Ú
_wrap_w_kwr  r¯  rä  r   )
rn   ÚclsnamerG   ÚclsdictÚfn_regr  r   rK   r`   Úwrappedr°  r   r   r   ¾  s   
€zEnsureKWArgType.__init__c                    s   ‡ fdd„}t |ˆ ƒS )Nc                     s   ˆ | Ž S r   r   )rÑ   rú   rD  r   r   ÚwrapÌ  rR  z(EnsureKWArgType._wrap_w_kw.<locals>.wrapr   )r   rK   rí  r   rD  r   rè  Ë  s   
zEnsureKWArgType._wrap_w_kw)r+   r,   r-   r.   r   rè  r²  r   r   r°  r   rä  ¸  s    rä  c                 C   sh   t |dƒr
t| |ƒS | }|jj|_t |dƒr|j|_t |jdƒr+|jjr+|jj|_|S |jr2|j|_|S )z‘Augment functools.update_wrapper() to work with objects with
    a ``__call__()`` method.

    :param fn:
      object with __call__ method

    r+   r,   r.   )r4   r   rã   r+   r,   r°   r.   )ÚwrapperrK   Ú_fr   r   r   Úwrap_callableÒ  s   




ýrð  c                 C   sÎ   d| vr	|   d¡S d}g g}d}t| ƒ}||k r`| | }|dkrC|dkr>||d k r>| |d  dkr>|d  d¡ |d7 }n|dN }n|dkrQ|dkrQ| g ¡ n|d  |¡ |d7 }||k sdd„ |D ƒS )aÄ  Parse a dotted identifier with accommodation for quoted names.

    Includes support for SQL-style double quotes as a literal character.

    E.g.::

        >>> quoted_token_parser("name")
        ["name"]
        >>> quoted_token_parser("schema.name")
        ["schema", "name"]
        >>> quoted_token_parser('"Schema"."Name"')
        ['Schema', 'Name']
        >>> quoted_token_parser('"Schema"."Name""Foo"')
        ['Schema', 'Name""Foo']

    ú"rl   r   r   rm   c                 S   s   g | ]}d   |¡‘qS )Ú )rä   )rÐ   r‹   r   r   r   rÓ     s    z'quoted_token_parser.<locals>.<listcomp>)rt   rÃ   r5   )r$   r÷   r9  ÚidxÚlvÚcharr   r   r   Úquoted_token_parserê  s&   
$

ôrö  r   )FF)T)r   Nr   )NNr  N)NNNr*   )rÅ  )Tr.   Ú	functoolsr   r   rV   r@   r)  ræ  r   r’   rÑ  rò  r   r   r   r   rÇ   r   r9   rJ   rN   ri   r\   r{   r}   r˜   r    r–   rƒ   r­   rº   r[   rÉ   rË   rÎ   rò   ró   r  r  r#  r&  r6  r7  rF  rG  rP  r\  r]  r‡  r‹  r�  r�  r’  r—  r¡  r¤  r-  rw  r®  r³  r·  rŒ  r¸  r+   ro   rÂ  rÃ  rÄ  rÇ  Ú	text_typerÈ  r"   rÕ  rÚ  ÚcompileÚ_SQLA_REÚ_UNITTEST_RErà  rs   ÚNoneTyperã  rä  rð  rö  r   r   r   r   Ú<module>   s¦   .	0
*(	þ

*
Z
H3
ú?
V
(u

!$





