a
    •˜ëjM ã                
   @  s”  U d Z ddlmZ ddlZddl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lmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddlm"Z" ddl#Z#ddl$m%Z% ddl$m&Z& ddl'm(Z( ddlm)Z) ddl$m*Z* e!dƒZ+e!d d!d"�Z,e!d#ed$ef d%�Z-e!d&d'd%�Z.e!d(d)d%�Z/e!d*d+d%�Z0e!d,d-d%�Z1d.d/d0œd1d2„Z2G d3d4„ d4ƒZ3d5d6d7œd8d9„Z4d.d/d:œd;d<„Z5�d4d=d>d/d?œd@dA„Z6dBdCdDdEœdFdG„Z7dHdIdJœdKdL„Z8dMd/dNdOœdPdQ„Z9dRdSdTdUœdVdW„Z:e!dXdCd%�Z;dCdYdZœd[d\„Z<d]d^d/dCd_œd`da„Z=e!dbƒZ>e!dcƒZ?G ddde„ deƒZ@dfdg„ ZAedd$dhœdidjdkdldmœdndo„ƒZBeddpdhœdidjdDdjdmœdqdo„ƒZBddpdhœdidjdDdjdmœdrdo„ZBdCdsdtœdudv„ZC�d5dCdDdDdwdxœdydz„ZD�d6d{dDd|d}œd~d„ZE�d7d€d�„ZF�d8d=d/d/dMdMdMdMdƒd„œd…d†„ZGd‡dˆ„ ZHd‰dŠ„ ZI�d9d.d‹dŒdMd/d�œdŽd�„ZJG d�d‘„ d‘ƒZKd’d“„ ZLd”d•„ ZM�d:d—d˜„ZNd™dš„ ZO�d;d›dœ„ZPe!d�džd%�ZQG dŸd „ d ee, ƒZRG d¡d¢„ d¢eRe, ƒZSG d£d¤„ d¤eRe, ƒZTe �rleRZUeRZVeWZXeWZYneT ZUZXeS ZVZYd#d#d¥œd¦d§„ZZG d¨d©„ d©ƒZ[e �r¦eWZ\ne[j]Z\G dªd«„ d«ƒZ^d.dDd¬œd­d®„Z_d/d¯d°œd±d²„Z`d.d³d´œdµd¶„Za�d<d^d/d=dDd·d¸d¹œdºd»„Zbd.d=dId¼œd½d¾„Zcdd5d.d.dd¿œdÀdÁ„ZddÂdÃœdÄdÅ„Ze�d=d.dÆdÆdÇœdÈdÉ„Zfd.dÊd/d.dËœdÌdÍ„ZgdÎdÏ„ ZhG dÐdÑ„ dÑeWƒZiG dÒdÓ„ dÓee+ ƒZjG dÔdÕ„ dÕee+ ƒZkG dÖd×„ d×ee+ ƒZlG dØdÙ„ dÙemƒZnG dÚdÛ„ dÛeoƒZpG dÜdÝ„ dÝepdÞ�Zqe �rddßlmrZr erZsneqZse!dàejtd%�Zu�d>d.dád/dDdâdãœdädå„Zvdawd.d¸dæœdçdè„ZxdCd.d.d.déœdêdë„Zy�d?dídî„ZzG dïdð„ dðe{ƒZ|�d@d/d>d¸dñœdòdó„Z}d/dôd¸dõœdöd÷„Z~i Zdøe€dù< d/dúdûdüœdýdþ„Z�e
 ‚dÿ¡Zƒ�dA�d �ddSd¸�dœ�d�d„Z„�ddD�d�dœ�d�d	„Z…e
 ‚�d
¡Z†e
 ‚�d¡Z‡e‡e†fds�d�dds�dœ�d�d„ZˆeodƒZ‰�d�d„ ZŠe
 ‚�d¡Z‹G �d�d„ �dƒZŒG �d�d„ �dƒZ��d�d„ ZŽ�dBd/dSd³�dœ�d�d„Z�d/d/d°œ�d�d„Z��d�d„ Z‘d.d/dû�d œ�d!�d"„Z’d/d/d°œ�d#�d$„Z“d>d/dSd/�d%œ�d&�d'„Z”e
 ‚�d(¡Z•d/�d)d/�d*œ�d+�d,„Z–dsd>�d-œ�d.�d/„Z—�dC�d0�d1„Z˜G �d2�d3„ �d3ejtƒZ™e™jšZše"e+e)e™jš f Z›dS (D  z…Routines to help with the creation, loading and introspection of
modules, classes, hierarchies, attributes, functions, and methods.

é    )ÚannotationsN©Úupdate_wrapper)ÚCodeType)ÚAny)ÚCallable)Úcast)ÚDict)Ú	FrozenSet)ÚGeneric)ÚIterator)ÚList)ÚNoReturn)ÚOptional)Úoverload)ÚSequence)ÚSet)ÚTuple)ÚType)ÚTYPE_CHECKING)ÚTypeVar)ÚUnioné   )Ú_collections)Úcompat)ÚHAS_CYEXTENSION)ÚLiteralé   )ÚexcÚ_TÚ_T_coT)Ú	covariantÚ_F.)ÚboundÚ_MPzmemoized_property[Any]Ú_MAz#HasMemoized.memoized_attribute[Any]Ú_HPzhybridproperty[Any]Ú_HMzhybridmethod[Any]r   Ústr)ÚxÚreturnc                 C  s*   |   d¡} t ¡ }| | ¡ tt| ¡ ƒS )Nzutf-8)Úencoder   Zmd5_not_for_securityÚupdater   r(   Ú	hexdigest)r)   Úm© r/   úZ/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.pyÚmd5_hex?   s    

r1   c                   @  s@   e Zd ZU dZdZded< ddœdd„Zd	d
dddœdd„ZdS )Úsafe_reraisea  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()

    TODO: we should at some point evaluate current behaviors in this regard
    based on current greenlet, gevent/eventlet implementations in Python 3, and
    also see the degree to which our own asyncio (based on greenlet also) is
    impacted by this. .rollback() will cause IO / context switch to occur in
    all these scenarios; what happens to the exception context from an
    "except:" block if we don't explicitly store it? Original issue was #2703.

    )Ú	_exc_infozdUnion[None, Tuple[Type[BaseException], BaseException, types.TracebackType], Tuple[None, None, None]]r3   ÚNone©r*   c                 C  s   t  ¡ | _d S ©N)ÚsysÚexc_infor3   ©Úselfr/   r/   r0   Ú	__enter__k   s    zsafe_reraise.__enter__zOptional[Type[BaseException]]zOptional[BaseException]zOptional[types.TracebackType]r   )Útype_ÚvalueÚ	tracebackr*   c                 C  s`   | j d usJ ‚|d u r@| j \}}}|d us.J ‚d | _ | |¡‚nd | _ |d usRJ ‚| |¡‚d S r6   )r3   Úwith_traceback)r:   r<   r=   r>   Úexc_typeÚ	exc_valueÚexc_tbr/   r/   r0   Ú__exit__n   s    zsafe_reraise.__exit__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Ú__annotations__r;   rC   r/   r/   r/   r0   r2   F   s
   

r2   zType[_T]zIterator[Type[_T]])Úclsr*   c                 c  sH   t ƒ }| g}|rD| ¡ } | |v r$qn
| | ¡ | |  ¡ ¡ | V  qd S r6   )ÚsetÚpopÚaddÚextendÚ__subclasses__)rJ   ÚseenÚstackr/   r/   r0   Úwalk_subclasses�   s    
rR   )Úelementr*   c                 C  s8   t | tƒr| S z
t| ƒW S  ty2   d|   Y S 0 d S )Nzunprintable element %r)Ú
isinstancer(   Ú	Exception)rS   r/   r/   r0   Ústring_or_unprintable�   s    

rV   z	Type[Any]úOptional[str])rJ   Úuse_namer*   c                 C  s&   |p| j }d dd„ t d|¡D ƒ¡S )Nú c                 s  s   | ]}|  ¡ V  qd S r6   )Úlower)Ú.0Únr/   r/   r0   Ú	<genexpr>�   ó    z(clsname_as_plain_name.<locals>.<genexpr>z([A-Z][a-z]+|SQL))rD   ÚjoinÚreÚfindall)rJ   rX   Únamer/   r/   r0   Úclsname_as_plain_name™   s    
rc   zUnion[Type[Any], object]úCallable[..., Any]Úbool)Úinstance_or_clsÚagainst_methodr*   c                 C  s.   t | tƒs| j}n| }|j}t||ƒ}||kS )z1Return True if the two class methods don't match.)rT   ÚtypeÚ	__class__rD   Úgetattr)rf   rg   Zcurrent_clsÚmethod_nameZcurrent_methodr/   r/   r0   Úmethod_is_overridden    s    

rl   ÚslicezTuple[Any, ...])Úslcr*   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Úhasattrro   ÚappendÚtuple)rn   Úretr)   r/   r/   r0   Údecode_slice²   s    
rw   zSequence[str]zIterator[str])ÚusedÚbasesr*   c                 '  sh   t | ƒ}|D ]V‰ t ˆ ft‡ fdd„tdƒƒ¡}|D ] }||vr4| |¡ |V   qq4tdˆ  ƒ‚qd S )Nc                   s   ˆ t | ƒ S r6   ©r(   )Úi©Úbaser/   r0   Ú<lambda>Å   r^   z!_unique_symbols.<locals>.<lambda>iè  z&exhausted namespace for symbol base %s)rK   Ú	itertoolsÚchainÚmapÚrangerM   Ú	NameError)rx   ry   Zused_setÚpoolÚsymr/   r|   r0   Ú_unique_symbolsÀ   s    þ
r†   zCallable[[int], Any]ÚintzIterator[Any])Úfnr\   r*   c                 c  s*   |r&|| d @ }| |ƒV  ||N }q dS )z6Call the given function given each nonzero bit from n.r   Nr/   )rˆ   r\   Úbr/   r/   r0   Úmap_bitsÐ   s    
rŠ   Ú_FnzCallable[[_Fn], _Fn])Útargetr*   c                   s   dddœ‡ fdd„}t |ˆ ƒS )z'A signature-matching decorator factory.r‹   ©rˆ   r*   c                   sÀ  t  | ¡st  | ¡stdƒ‚t| dd ƒ}|d urVd | _zt | ¡}W || _q`|| _0 n
t | ¡}dt|j	pldƒ }t
 |jp~d¡}|ji ||d�}ttd|d ƒƒtd|dd	… ƒ | jf }t|d
dƒ\}}t
||d�}| t|dd�¡ | j|d< t  | ¡�rd|d< d|d< d|d< n>t  | ¡�rBd|d< d|d< d|d< nd|d< d|d< d|d< dt|d ƒv �rvd| }	nd| }	|ˆ || d| ji}
ttjt|	|
| jƒƒ}| j|_| j|_t|| ƒS )Nznot a decoratable functionÚ__annotate__r6   r/   )r   ÚdefaultsÚkwonlydefaultszTuple[str, ...]r   r   é   rŒ   rˆ   )rŒ   rˆ   F©Úgroupedrb   zasync Úprefixzawait Ztarget_prefixÚ Ztarget_suffixz(yield from ú)Ú__zw%(prefix)sdef %(name)s%(grouped_args)s:
    return %(target_prefix)s%(target)s(%(fn)s, %(apply_pos)s)%(target_suffix)s
zv%(prefix)sdef %(name)s%(grouped_args)s:
    return %(target_prefix)s%(target)s(%(fn)s, %(apply_kw)s)%(target_suffix)s
rD   )ÚinspectÚ
isfunctionÚismethodrU   rj   rŽ   r   Úinspect_getfullargspecÚlenr�   ÚdictÚfromkeysr�   Ú_replaceru   r   rD   r†   r,   Úformat_argspec_plusÚiscoroutinefunctionÚisgeneratorfunctionÚreprrE   ÚtypesÚFunctionTypeÚ_exec_code_in_envÚ__defaults__Ú__kwdefaults__r   )rˆ   ZannofuncÚspecZempty_defaultsZempty_kwdefaultsÚnamesZ	targ_nameÚfn_nameÚmetadataÚcodeÚenvZ	decorated©rŒ   r/   r0   Údecorateá   sn    
ýÿþÿ



ýýýþzdecorator.<locals>.decorater   )rŒ   r°   r/   r¯   r0   Ú	decoratorÞ   s    Zr±   zUnion[str, types.CodeType]úDict[str, Any])r­   r®   r«   r*   c                 C  s   t | |ƒ || S r6   )Úexec)r­   r®   r«   r/   r/   r0   r¦   >  s    
r¦   Ú_PFÚ_TEc                   @  sZ   e Zd Zddddœdd„Zdd„ Zdd	d
œdd„Zdddddœdd„Zddd
œdd„ZdS )ÚPluginLoaderNr(   zOptional[Callable[..., Any]])ÚgroupÚauto_fnc                 C  s   || _ i | _|| _d S r6   )r·   Úimplsr¸   )r:   r·   r¸   r/   r/   r0   Ú__init__J  s    zPluginLoader.__init__c                 C  s   | j  ¡  d S r6   )r¹   Úclearr9   r/   r/   r0   r»   Q  s    zPluginLoader.clearr   )rb   r*   c                 C  s†   || j v r| j | ƒ S | jr:|  |¡}|r:|| j |< |ƒ S t | j¡D ]&}|j|krF|j| j |< | ¡   S qFt d| j|f ¡‚d S )NzCan't load plugin: %s:%s)	r¹   r¸   r   Zimportlib_metadata_getr·   rb   Úloadr   ZNoSuchModuleError)r:   rb   ÚloaderÚimplr/   r/   r0   r¼   T  s    



ÿzPluginLoader.loadr4   )rb   Ú
modulepathÚobjnamer*   c                   s   ‡ ‡fdd„}|| j |< d S )Nc                    s4   t ˆ ƒ} ˆ  d¡dd … D ]}t| |ƒ} qt| ˆƒS )NÚ.r   )Ú
__import__Úsplitrj   )ÚmodÚtoken©r¿   rÀ   r/   r0   r¼   h  s    z#PluginLoader.register.<locals>.load©r¹   )r:   rb   r¿   rÀ   r¼   r/   rÆ   r0   Úregisterg  s    zPluginLoader.registerc                 C  s   | j |= d S r6   rÇ   )r:   rb   r/   r/   r0   Ú
deregisterp  s    zPluginLoader.deregister)N)rD   rE   rF   rº   r»   r¼   rÈ   rÉ   r/   r/   r/   r0   r¶   I  s    ÿ	r¶   c                 C  sl   z
t j}W n0 ty:   t | ¡}|d t|d ƒf Y S 0 | j}|j}t|j	d |… ƒt|j
|@ ƒfS d S )Nr   r   )r˜   ÚCO_VARKEYWORDSÚAttributeErrorr   r›   re   Ú__code__Úco_argcountÚlistÚco_varnamesÚco_flags)rˆ   Zco_varkeywordsr©   ÚcoÚnargsr/   r/   r0   Ú_inspect_func_argst  s    

þrÓ   )Ú_setÚraiseerrrh   zOptional[Set[str]]zLiteral[True]zSet[str])rJ   rÔ   rÕ   r*   c                C  s   d S r6   r/   ©rJ   rÔ   rÕ   r/   r/   r0   Úget_cls_kwargsˆ  s    r×   Fc                C  s   d S r6   r/   rÖ   r/   r/   r0   r×   ‘  s    c          	      C  sÂ   |du }|rt ƒ }|dusJ ‚| j dd¡}|oHt|tjƒoHt|jtjƒ}|rˆt|ƒ\}}| 	|¡ |sŒ|sŒ|r‚t
d| › d�ƒ‚qŒdS nd}|r”|r´| jD ]}t||d�du rš q´qš| d¡ |S )ae  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.getfullargspec() to cut down on method overhead,
    as this is used within the Core typing system to create copies of type
    objects which is a performance-sensitive operation.

    No anonymous tuple arguments please !

    Nrº   Fz
given cls z  doesn't have an __init__ method)rÔ   r:   )rK   Ú__dict__ÚgetrT   r¤   r¥   rÌ   r   rÓ   r,   Ú	TypeErrorÚ	__bases__r×   Údiscard)	rJ   rÔ   rÕ   ÚtoplevelZctrZhas_initrª   Zhas_kwÚcr/   r/   r0   r×   —  s4    
ÿý

ÿ

z	List[str]©Úfuncr*   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›   ©rà   r/   r/   r0   Úget_func_kwargsÌ  s    râ   zcompat.FullArgSpec)rˆ   Úno_selfÚ_is_initr*   c              	   C  sd  t  | ¡rtd|  ƒ‚�nFt  | ¡sBt| dƒrŒt  | ¡sŒt  | ¡sŒ|r€|r€t | ¡}t 	|j
dd… |j|j|j|j|j|j¡S t | ¡S nÔt  | ¡rê|rÜ|s¤| jrÜt | j¡}t 	|j
dd… |j|j|j|j|j|j¡S t | j¡S nvt  | ¡�rt| j|dd�S t| dƒ�rt | j¡S t| dƒ�rTt  | j¡�rFt| j|d	�S td
|  ƒ‚ntd
|  ƒ‚dS )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Ì   r   NT)rã   rä   Ú__func__Ú__call__)rã   zCan't inspect callable: %s)r˜   Ú	isbuiltinrÚ   r™   rs   Úisclassrš   r   r›   ÚFullArgSpecÚargsÚvarargsÚvarkwr�   Ú
kwonlyargsr�   r   Ú__self__rå   Úget_callable_argspecrº   ræ   )rˆ   rã   rä   r©   r/   r/   r0   rï   ×  sZ    

ÿþý
ù

ù
ÿrï   z-Union[Callable[..., Any], compat.FullArgSpec]zDict[str, Optional[str]])rˆ   r“   r*   c              	   C  sº  t | ƒrt | ¡}n| }tj|Ž }t |d |d |d d|d ¡}|d r„|d d }t |d dd… |d |d d|d ¡}n"|d ržd|d  }|}nd}|}d}|d rÌ|tttt |d ƒƒ7 }|d rä|t|d ƒ7 }|d |d  }|�r|d| d… }	nd}	tj||d |d |	d	d
„ d�}
|d �rdtj|dd… |d |d |	dd
„ d�}n|
}|�r‚t||||
||d�S t|||dd… |
dd… |dd… |dd… d�S 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.
    apply_pos_proxied
      Like apply_pos but omits the self/cls argument

    Example::

      >>> format_argspec_plus(lambda self, a, b, c=3, **d: 123)
      {'grouped_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   r   Né   z%s[0]r‘   r/   c                 S  s   dt | ƒ S ©Nú=rz   ©r)   r/   r/   r0   r~   f  r^   z%format_argspec_plus.<locals>.<lambda>)Úformatvaluec                 S  s   dt | ƒ S rñ   rz   ró   r/   r/   r0   r~   o  r^   )Úgrouped_argsÚself_argÚ	apply_posÚapply_kwÚapply_pos_proxiedÚapply_kw_proxiedéÿÿÿÿ)	Úcallabler   r›   Úinspect_formatargspecrœ   r   r   r   r�   )rˆ   r“   r©   rê   r÷   rö   rù   Únum_defaultsZ	name_argsZdefaulted_valsrø   rú   r/   r/   r0   r      sv    $
ÿ"ÿû

ûú	



úr    c                 C  sz   | t ju r(d}|rdnd}|r"dnd}n>zt| |d�W S  tyd   d}|rP|nd}|r\dnd	}Y n0 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:

    .. sourcecode:: text

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

    z(self)r:   z()r•   r’   z(self, *args, **kwargs)zself, *args, **kwargsz(*args, **kwargs)z*args, **kwargs)rö   rõ   r÷   rø   rù   rú   )Úobjectrº   r    rÚ   r�   )Úmethodr“   rõ   rê   Zproxiedr/   r/   r0   Úformat_argspec_initˆ  s$    
úr  r/   zCallable[[_T], _T])Ú
target_clsÚtarget_cls_sphinx_nameÚproxy_cls_sphinx_nameÚclassmethodsÚmethodsÚ
attributesÚuse_intermediate_variabler*   c                 C  s   dd„ }|S )aS  A class decorator indicating attributes should refer to a proxy
    class.

    This decorator is now a "marker" that does nothing at runtime.  Instead,
    it is consumed by the tools/generate_proxy_methods.py script to
    statically generate proxy methods and attributes that are fully
    recognized by typing tools such as mypy.

    c                 S  s   | S r6   r/   )rJ   r/   r/   r0   r°   ¼  s    z&create_proxy_methods.<locals>.decorater/   )r  r  r  r  r  r  r  r°   r/   r/   r0   Úcreate_proxy_methods©  s    r	  c                 C  sR   zt  | ¡W S  tyL   | tju r6dgdddf Y S dgdddf Y S Y n0 dS )a  inspect.getargspec with considerations for typical __init__ methods

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

    .. sourcecode:: text

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

    r:   Nrê   Úkwargs)r   r›   rÚ   rÿ   rº   )r   r/   r/   r0   Úgetargspec_initÂ  s    
r  c                 C  s    t | tjƒr| js| jS | S dS )zSAdjust the incoming callable such that a 'self' argument is not
    required.

    N)rT   r¤   Ú
MethodTyperî   rå   )Zfunc_or_clsr/   r/   r0   Úunbound_method_to_callableÖ  s    r  zSequence[Tuple[str, Any]]z%Optional[Union[object, List[object]]])ÚobjÚadditional_kwÚ
to_inspectÚ
omit_kwargr*   c              	     sP  |du rˆg}n
t  |¡}tƒ ‰ g }t  ¡ }d}t|ƒD ]ä\}}zt |j¡}	W n tyf   Y q8Y q80 |	j	rxt
|	j	ƒnd}
|dkrÂ|	jr�|	j}|
r¬| |	jd|
 … ¡ qæ| |	jdd… ¡ n$| ‡ fdd„|	jd|
 … D ƒ¡ |
r8|	j	sôJ ‚| dd„ t|	j|
 d… |	j	ƒD ƒ¡ q8g }| ‡fdd„|D ƒ¡ |du�rjtˆ|ƒ�rj| d	d„ tˆ|ƒD ƒ¡ | ¡ D ]d\}}||v �rˆ�qrz6tˆ|ˆ ƒ}|ˆ u�r¼||k�r¼| d
||f ¡ W n t�yÒ   Y n0 �qr|�r:|D ]V\}}z6tˆ|ˆ ƒ}|ˆ u�r||k�r| d
||f ¡ W n t�y4   Y n0 �qâ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/   ©r[   Úarg)Úmissingr/   r0   Ú
<listcomp>  r^   z generic_repr.<locals>.<listcomp>c                 S  s   g | ]\}}||f‘qS r/   r/   )r[   r  Údefaultr/   r/   r0   r    s   ÿc                 3  s   | ]}t tˆ |d ƒƒV  qd S r6   )r£   rj   r  ©r  r/   r0   r]     r^   zgeneric_repr.<locals>.<genexpr>c                 S  s   g | ]}t |ƒ‘qS r/   ©r£   )r[   Úvalr/   r/   r0   r    r^   z%s=%rz%s(%s)ú, )r   Úto_listrÿ   ÚOrderedDictÚ	enumerater   r›   rº   rÚ   r�   rœ   rë   rN   rê   r,   Úziprs   rj   Úitemsrt   rU   ri   rD   r_   )r  r  r  r  Zpos_argsZkw_argsZvargsr{   Zinspr©   Zdefault_lenÚoutputr  Zdefvalr  r/   )r  r  r0   Úgeneric_reprâ  sj    


ÿ
ÿþÿ


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.

    )rŒ   rb   r
  Ú__weakref__c                 C  s   | j | j| jdœS )N©rŒ   rb   r
  r$  r9   r/   r/   r0   Ú__getstate__8  s    ýz$portable_instancemethod.__getstate__c                 C  s&   |d | _ |d | _| dd¡| _d S )NrŒ   rb   r
  r/   )rŒ   rb   rÙ   r
  )r:   Ústater/   r/   r0   Ú__setstate__?  s    

z$portable_instancemethod.__setstate__r/   c                 C  s   |j | _|j| _|| _d S r6   )rî   rŒ   rD   rb   r
  )r:   Úmethr
  r/   r/   r0   rº   D  s    z portable_instancemethod.__init__c                 O  s$   |  | j¡ t| j| jƒ|i |¤ŽS r6   )r,   r
  rj   rŒ   rb   )r:   r  Úkwr/   r/   r0   ræ   I  s    z portable_instancemethod.__call__N)r/   )	rD   rE   rF   rG   rH   r%  r'  rº   ræ   r/   r/   r/   r0   r"  0  s   
r"  c                   sº   | h‰ t | jƒ}|r²| ¡ }‡ fdd„|jD ƒ}|D ]}| |¡ ˆ  |¡ q4|tu s|jdkst|dƒslq‡ fdd„t	|t
ƒsˆ| ¡ n| |¡D ƒD ]}| |¡ ˆ  |¡ q–q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.
    Likewise, class_hierarchy(class A(Generic[T])) returns
    (A, Generic, object), not every class systemwide that derives from Generic.

    c                 3  s   | ]}|ˆ vr|V  qd S r6   r/   ©r[   Ú_©Zhierr/   r0   r]   _  r^   z"class_hierarchy.<locals>.<genexpr>ÚbuiltinsrO   c                   s   g | ]}|ˆ vr|‘qS r/   r/   r*  r,  r/   r0   r  l  s   úz#class_hierarchy.<locals>.<listcomp>)rÎ   Ú__mro__rL   rÛ   rt   rM   r   rE   rs   Ú
issubclassrh   rO   )rJ   ÚprocessrÞ   ry   r‰   Úsr/   r,  r0   Úclass_hierarchyN  s.    

ÿþý
ÿ
û
	
r2  c                 c  s@   t | ƒ}|D ].}| jD ]"}||jv r||j| fV   q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Ø   )rJ   ÚkeysÚkeyrÞ   r/   r/   r0   Úiterate_attributesz  s    

r6  ú
self.proxyc              	     s4  |r
|}n$ˆdu rd‰‡ ‡fdd„t |ƒD ƒ}|D ]ü}z4t||ƒ}t|dƒsPW q2t|d|ƒ}ttj|ƒ}	W n ty€   Y q2Y n0 z2t |	¡}
t 	|
d ¡}t 	|
d dd… ¡}W n t
yÎ   d	}d
}Y n0 dtƒ  }|durê||ipìi }t||ƒ z|	j|| _W n t�y   Y n0 tˆ ||| ƒ q2dS )z9Automates delegation of __specials__ for a proxying type.N)rH   Ú__del__Ú__getattribute__Ú__metaclass__r%  r'  c                   s6   g | ].}|  d ¡r| d ¡rtˆ |ƒs|ˆvr|‘qS )r—   )Ú
startswithÚendswithrs   ©r[   r.   ©Úinto_clsÚskipr/   r0   r     s   


úz0monkeypatch_proxied_specials.<locals>.<listcomp>ræ   rå   r   r   z(self, *args, **kw)z(*args, **kw)z?def %(method)s%(fn_args)s: return %(name)s.%(method)s%(d_args)s)r3  rj   rs   r   r¤   r¥   rË   r   r›   rý   rÚ   Úlocalsr³   r§   Úsetattr)r?  Zfrom_clsr@  Úonlyrb   Zfrom_instanceZdundersr   Zmaybe_fnrˆ   r©   Zfn_argsZd_argsÚpyr®   r/   r>  r0   Úmonkeypatch_proxied_specialsŠ  sF    
þ




ÿÿÿ
rE  c                 C  s   t | d| ƒt |d|ƒu S )z;Return True if the two methods are the same implementation.rå   )rj   )Zmeth1Zmeth2r/   r/   r0   Úmethods_equivalentÍ  s    ÿrF  c                 C  sp  |s|st dƒ‚t|tƒr(t| |ƒr(| S t|p>dd„ t|ƒD ƒƒ}tt| ƒƒ}tj}t|tƒrd|}n|svtƒ }tj}nt|ƒ}|| |¡|ƒr’| S t| t	ƒsÆ|tju rªdp¬d}t d| |d 
|¡f ƒ‚G dd	„ d	ƒ}|räd
|j |_tƒ }	t| ƒD ]R\}
}|
|v�rt d|
 ƒ‚t|ƒ�s*t d|
|f ƒ‚t||
t|ƒƒ |	 |
¡ qò||	|ƒ�rV|S t dd 
||	 ¡ ƒ‚dS )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/   r0   r  ü  r^   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©rD   rE   rF   rG   r/   r/   r/   r0   ÚAnonymousInterface  s   rH  Z	Anonymousz%r: unknown in this interfacez%r=%r is not callablez,dictionary does not contain required keys %sN)rÚ   rT   rh   rK   r3  ÚoperatorÚgeÚgtÚintersectionr�   r_   rD   Údictlike_iteritemsrü   rB  ÚstaticmethodrM   )r  rJ   r  ÚrequiredZ	interfaceZimplementedZcompliesZ	qualifierrH  Úfoundr   r¾   r/   r/   r0   Úas_interfaceÕ  sP    !

ÿÿ

ÿÿrQ  Ú_GFDzgeneric_fn_descriptor[Any]c                   @  sÊ   e Zd ZU dZded< ded< ded< d$ddd	œd
d„Zedddddœdd„ƒZeddddœdd„ƒZdddddœdd„Zer ddddœdd„Z	dddœdd„Z
dddœdd „Zedddd!œd"d#„ƒZdS )%Úgeneric_fn_descriptorag  Descriptor which proxies a function when the attribute is not
    present in dict

    This superclass is organized in a particular way with "memoized" and
    "non-memoized" implementation classes that are hidden from type checkers,
    as Mypy seems to not be able to handle seeing multiple kinds of descriptor
    classes used for the same attribute.

    zCallable[..., _T_co]ÚfgetrW   rG   r(   rD   N©rT  Údocc                 C  s   || _ |p|j| _|j| _d S r6   ©rT  rG   rD   ©r:   rT  rV  r/   r/   r0   rº   =  s    zgeneric_fn_descriptor.__init__rR  r4   r   ©r:   r  rJ   r*   c                 C  s   d S r6   r/   ©r:   r  rJ   r/   r/   r0   Ú__get__B  s    zgeneric_fn_descriptor.__get__rÿ   r    ©r  rJ   r*   c                 C  s   d S r6   r/   rZ  r/   r/   r0   r[  E  s    zUnion[_GFD, _T_co]c                 C  s
   t ƒ ‚d S r6   ©ÚNotImplementedErrorrZ  r/   r/   r0   r[  H  s    ©Úinstancer=   r*   c                 C  s   d S r6   r/   ©r:   r`  r=   r/   r/   r0   Ú__set__M  r^   zgeneric_fn_descriptor.__set__©r`  r*   c                 C  s   d S r6   r/   )r:   r`  r/   r/   r0   Ú
__delete__O  r^   z generic_fn_descriptor.__delete__©r  r*   c                 C  s
   t ƒ ‚d S r6   r]  ©r:   r  r/   r/   r0   Ú_resetQ  s    zgeneric_fn_descriptor._reset)r  rb   r*   c                 C  s
   t ƒ ‚d S r6   r]  ©rJ   r  rb   r/   r/   r0   ÚresetT  s    zgeneric_fn_descriptor.reset)N)rD   rE   rF   rG   rI   rº   r   r[  r   rb  rd  rg  Úclassmethodri  r/   r/   r/   r0   rS  .  s    

rS  c                   @  s   e Zd ZdZesdd„ ZdS )Ú_non_memoized_propertyzÉa plain descriptor that proxies a function.

    primary rationale is to provide a plain attribute that's
    compatible with memoized_property which is also recognized as equivalent
    by mypy.

    c                 C  s   |d u r| S |   |¡S r6   ©rT  rZ  r/   r/   r0   r[  d  s    z_non_memoized_property.__get__N)rD   rE   rF   rG   r   r[  r/   r/   r/   r0   rk  Y  s   rk  c                   @  s0   e Zd ZdZesdd„ Zdd„ Zedd„ ƒZdS )	Ú_memoized_propertyz2A read-only @property that is only evaluated once.c                 C  s&   |d u r| S |   |¡ |j| j< }|S r6   )rT  rØ   rD   ©r:   r  rJ   Úresultr/   r/   r0   r[  o  s    z_memoized_property.__get__c                 C  s   t  || j¡ d S r6   )rm  ri  rD   rf  r/   r/   r0   rg  u  s    z_memoized_property._resetc                 C  s   |j  |d ¡ d S r6   )rØ   rL   rh  r/   r/   r0   ri  x  s    z_memoized_property.resetN)	rD   rE   rF   rG   r   r[  rg  rj  ri  r/   r/   r/   r0   rm  j  s   rm  r�   c                   s   ‡ fdd„}t |ˆ ƒS )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   ˆ S r6   r/   ©Úar)  ©ro  r/   r0   Úmemo¥  s    z6memoized_instancemethod.<locals>.oneshot.<locals>.memo)rD   rG   rØ   ©r:   rê   r)  rs  ©rˆ   rr  r0   Úoneshot¢  s    z(memoized_instancemethod.<locals>.oneshotr   )rˆ   rv  r/   ru  r0   Úmemoized_instancemethod™  s    	rw  c                   @  s~   e Zd ZU dZesdZeƒ Zded< ddœdd„Z	ddœd	d
„Z
ddddœdd„ZG dd„ dee ƒZedddœdd„ƒZdS )ÚHasMemoizedzA mixin class that maintains the names of memoized elements in a
    collection for easy cache clearing, generative, etc.

    r/   zFrozenSet[str]Ú_memoized_keysr4   r5   c                 C  s   | j D ]}| j |d ¡ qd S r6   )ry  rØ   rL   ©r:   Úelemr/   r/   r0   Ú_reset_memoizations½  s    
zHasMemoized._reset_memoizationsc                 C  s   | j D ]}|| jvsJ ‚qd S r6   )ry  rØ   rz  r/   r/   r0   Ú_assert_no_memoizationsÁ  s    
z#HasMemoized._assert_no_memoizationsr(   r   )r5  r=   r*   c                 C  s   || j |< |  j|hO  _d S r6   )rØ   ry  )r:   r5  r=   r/   r/   r0   Ú_set_memoized_attributeÅ  s    
z#HasMemoized._set_memoized_attributec                   @  sr   e Zd ZU dZded< ded< ded< dddd	œd
d„Zedddddœdd„ƒZeddddœdd„ƒZdd„ ZdS )zHasMemoized.memoized_attributezTA read-only @property that is only evaluated once.

        :meta private:

        úCallable[..., _T]rT  rW   rG   r(   rD   NrU  c                 C  s   || _ |p|j| _|j| _d S r6   rW  rX  r/   r/   r0   rº   Ô  s    z'HasMemoized.memoized_attribute.__init__r%   r4   r   rY  c                 C  s   d S r6   r/   rZ  r/   r/   r0   r[  Ù  s    z&HasMemoized.memoized_attribute.__get__r   r\  c                 C  s   d S r6   r/   rZ  r/   r/   r0   r[  Ü  s    c                 C  s8   |d u r| S |   |¡ |j| j< }| j| jhO  _|S r6   )rT  rØ   rD   ry  rn  r/   r/   r0   r[  ß  s
    )N)rD   rE   rF   rG   rI   rº   r   r[  r/   r/   r/   r0   Úmemoized_attributeÉ  s   
r€  r"   r�   c                   s"   dddddœ‡ fdd„}t |ˆ ƒS )zMDecorate a method memoize its return value.

        :meta private:

        r   )r:   rê   r)  r*   c                   sT   ˆ| g|¢R i |¤Ž‰ ‡ fdd„}ˆj |_ ˆj|_|| jˆj < |  jˆj hO  _ˆ S )Nc                    s   ˆ S r6   r/   rp  rr  r/   r0   rs  ñ  s    zBHasMemoized.memoized_instancemethod.<locals>.oneshot.<locals>.memo)rD   rG   rØ   ry  rt  ru  rr  r0   rv  î  s    z4HasMemoized.memoized_instancemethod.<locals>.oneshotr   )rJ   rˆ   rv  r/   ru  r0   rw  æ  s    z#HasMemoized.memoized_instancemethodN)rD   rE   rF   rG   r   rH   Ú	frozensetry  rI   r|  r}  r~  Úmemoized_propertyr   r€  rj  rw  r/   r/   r/   r0   rx  °  s   
rx  c                   @  s,   e Zd ZdZdZdd„ Zdddœdd	„Zd
S )ÚMemoizedSlotsaT  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__.

    The memoized get is not threadsafe under freethreading and the
    creator method may in extremely rare cases be called more than once.

    r/   c                 C  s   t |ƒ‚d S r6   )rË   )r:   r5  r/   r/   r0   Ú_fallback_getattr  s    zMemoizedSlots._fallback_getattrr(   r   )r5  r*   c                   sž   ˆ   d¡sˆ   d¡rtˆ ƒ‚n|tˆjdˆ › �ƒrRtˆdˆ › �ƒƒ }tˆˆ |ƒ |S tˆjdˆ › �ƒr�tˆdˆ › �ƒ‰‡ ‡‡fdd„}ˆj|_|S ˆ ˆ ¡S d S )NZ_memoized_attr_Z_memoized_method_c                    s:   ˆ| i |¤Ž‰ ‡ fdd„}ˆj |_ ˆj|_tˆˆ|ƒ ˆ S )Nc                    s   ˆ S r6   r/   rp  rr  r/   r0   rs  %  s    z8MemoizedSlots.__getattr__.<locals>.oneshot.<locals>.memo)rD   rG   rB  )rê   r)  rs  ©r5  r(  r:   rr  r0   rv  "  s    z*MemoizedSlots.__getattr__.<locals>.oneshot)r;  rË   rs   ri   rj   rB  rG   r„  )r:   r5  r=   rv  r/   r…  r0   Ú__getattr__  s    ÿ
zMemoizedSlots.__getattr__N)rD   rE   rF   rG   rH   r„  r†  r/   r/   r/   r0   rƒ    s   
rƒ  re  c                 C  sB   t | tƒr:|  ¡  ¡ } | dv r"dS | dv r.dS td|  ƒ‚t| ƒS )N)ÚtrueÚyesÚonÚyÚtÚ1T)ÚfalseÚnoÚoffr\   ÚfÚ0FzString is not true/false: %r)rT   r(   ÚstriprZ   Ú
ValueErrorre   r  r/   r/   r0   Úasbool4  s    
r”  z!Callable[[str], Union[str, bool]])Útextr*   c                    s   dddœ‡ fdd„}|S )zqReturn a callable that will evaluate a string as
    boolean, or one of a set of "alternate" string values.

    r(   zUnion[str, bool]re  c                   s   | ˆ v r| S t | ƒS d S r6   )r”  r  ©r•  r/   r0   Úbool_or_valueF  s    z"bool_or_str.<locals>.bool_or_valuer/   )r•  r—  r/   r–  r0   Úbool_or_str@  s    r˜  úOptional[int])r=   r*   c                 C  s   | du r| S t | ƒS )zCoerce to integer.N)r‡   )r=   r/   r/   r0   ÚasintO  s    rš  zOptional[Dict[str, Any]]r4   )r)  r5  r<   Ú
flexi_boolÚdestr*   c                 C  sj   |du r| }|| v rft |tƒr,t | | |ƒsf| | durf|tu rV|rVt| | ƒ||< n|| | ƒ||< 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)rT   rh   re   r”  )r)  r5  r<   r›  rœ  r/   r/   r0   Úcoerce_kw_typeW  s    ÿþþ
ýr�  r\  c                   s$   t |ƒ}|ft‡ fdd„|D ƒƒ S )zbProduce a tuple structure that is cacheable using the __dict__ of
    obj to retrieve values

    c                 3  s&   | ]}|ˆ j v r|ˆ j | fV  qd S r6   ©rØ   ©r[   Úkr  r/   r0   r]   w  s   z"constructor_key.<locals>.<genexpr>)r×   ru   )r  rJ   rª   r/   r  r0   Úconstructor_keyq  s    ÿr¡  )r  rJ   rê   r)  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 r6   rž  rŸ  r  r/   r0   r]   „  s   z#constructor_copy.<locals>.<genexpr>)r×   r,   Ú
difference)r  rJ   rê   r)  rª   r/   r  r0   Úconstructor_copy|  s
    ÿr£  zCallable[[], int]r5   c                    s$   t  ¡ ‰t d¡‰ ‡ ‡fdd„} | S )z%Return a threadsafe counter function.r   c                     s0   ˆ� t ˆ ƒW  d   ƒ S 1 s"0    Y  d S r6   )Únextr/   ©ÚcounterÚlockr/   r0   Ú_next‘  s    zcounter.<locals>._next)Ú	threadingÚLockr   Úcount)r¨  r/   r¥  r0   r¦  Š  s    
r¦  zOptional[Type[Any]])Úspecimenr  r*   c                 C  s˜   t | dƒr*| jdur$t| jtƒr$tS | jS t| tƒr8tnt}|| tƒrJtS || tƒrXtS || tƒrftS t | dƒrttS t | dƒr‚tS t | dƒr�tS |S d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__Nrt   rM   rK   )rs   r­  r/  rK   rT   rh   rÎ   r�   )r¬  r  Zisar/   r/   r0   Úduck_type_collection˜  s(    
ÿ





r®  z'Union[Tuple[Type[Any], ...], Type[Any]])r  Úargtyperb   r*   c                 C  s^   t | |ƒr| S t |tƒrBt d|d dd„ |D ƒ¡t| ƒf ¡‚nt d||t| ƒf ¡‚d S )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[   rq  r/   r/   r0   r]   Ä  r^   z"assert_arg_type.<locals>.<genexpr>z6Argument '%s' is expected to be of type '%s', got '%s')rT   ru   r   ÚArgumentErrorr_   rh   )r  r¯  rb   r/   r/   r0   Úassert_arg_type»  s    

ÿÿÿÿr±  c                   s�   t ˆ dƒrtˆ  ¡ ƒS tˆ dtˆ ddƒƒ‰ˆdu r>tdˆ  ƒ‚t ˆ dƒr\‡ ‡fdd„}|ƒ S t ˆ d	ƒr€t‡fd
d„ˆ  ¡ D ƒƒS tdˆ  ƒ‚dS )z?Return a (key, value) iterator for almost any dict-like object.r  Ú__getitem__rÙ   NzObject '%r' is not dict-likeÚiterkeysc                  3  s,   ˆ   ¡ D ]} ˆd usJ ‚| ˆ| ƒfV  qd S r6   )r³  )r5  ©ÚdictlikeÚgetterr/   r0   ÚiteratorÙ  s    z$dictlike_iteritems.<locals>.iteratorr4  c                 3  s   | ]}|ˆ |ƒfV  qd S r6   r/   )r[   r5  )r¶  r/   r0   r]   à  r^   z%dictlike_iteritems.<locals>.<genexpr>)rs   rÎ   r  rj   rÚ   Úiterr4  )rµ  r·  r/   r´  r0   rM  Í  s    


rM  c                      sH   e Zd ZU dZded< ddddœ‡ fdd„Zddd	dd
œ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.

    zCallable[[Any], Any]rT  r   )rT  r  r)  c                   s&   t ƒ j|g|¢R i |¤Ž |j| _d S r6   )Úsuperrº   rG   )r:   rT  r  r)  ©ri   r/   r0   rº   ò  s    zclassproperty.__init__NzOptional[type]r\  c                 C  s
   |   |¡S r6   rl  rZ  r/   r/   r0   r[  ö  s    zclassproperty.__get__)N)rD   rE   rF   rG   rI   rº   r[  Ú__classcell__r/   r/   r»  r0   r¹  å  s   

r¹  c                   @  s<   e Zd Zddœdd„Zddddœdd	„Zd
ddœdd„ZdS )Úhybridpropertyr  rá   c                 C  s   || _ || _d S r6   )rà   Úclslevel©r:   rà   r/   r/   r0   rº   û  s    zhybridproperty.__init__r   r   ©r`  Úownerr*   c                 C  s$   |d u r|   |¡}|S |  |¡S d S r6   ©r¾  rà   ©r:   r`  rÁ  Zclsvalr/   r/   r0   r[  ÿ  s    
zhybridproperty.__get__rd   zhybridproperty[_T]rß   c                 C  s
   || _ | S r6   ©r¾  r¿  r/   r/   r0   Ú
classlevel  s    zhybridproperty.classlevelN)rD   rE   rF   rº   r[  rÅ  r/   r/   r/   r0   r½  ú  s   r½  c                   @  s^   e Zd Zddœdd„Zddddœdd	„Zddd
dœdd„Zdddœdd„Zdddœdd„ZdS )Úrw_hybridpropertyr  rá   c                 C  s   || _ || _d | _d S r6   )rà   r¾  Úsetfnr¿  r/   r/   r0   rº     s    zrw_hybridproperty.__init__r   r   rÀ  c                 C  s$   |d u r|   |¡}|S |  |¡S d S r6   rÂ  rÃ  r/   r/   r0   r[    s    
zrw_hybridproperty.__get__r4   r_  c                 C  s   | j d usJ ‚|   ||¡ d S r6   ©rÇ  ra  r/   r/   r0   rb    s    zrw_hybridproperty.__set__rd   zrw_hybridproperty[_T]rß   c                 C  s
   || _ | S r6   rÈ  r¿  r/   r/   r0   Úsetter  s    zrw_hybridproperty.setterc                 C  s
   || _ | S r6   rÄ  r¿  r/   r/   r0   rÅ     s    zrw_hybridproperty.classlevelN)rD   rE   rF   rº   r[  rb  rÉ  rÅ  r/   r/   r/   r0   rÆ    s
   rÆ  c                   @  s@   e Zd ZdZddœdd„Zddddœdd	„Zd
ddœdd„ZdS )Úhybridmethodz/Decorate a function as cls- or instance- level.r  rá   c                 C  s   | | _ | _|| _d S r6   )rà   rå   r¾  r¿  r/   r/   r0   rº   (  s    zhybridmethod.__init__r   rÀ  c                 C  s*   |d u r| j  ||j¡S | j ||¡S d S r6   )r¾  r[  ri   rà   )r:   r`  rÁ  r/   r/   r0   r[  ,  s    ÿÿzhybridmethod.__get__rd   zhybridmethod[_T]rß   c                 C  s
   || _ | S r6   rÄ  r¿  r/   r/   r0   rÅ  6  s    zhybridmethod.classlevelN)rD   rE   rF   rG   rº   r[  rÅ  r/   r/   r/   r0   rÊ  %  s   
rÊ  c                   @  s\   e Zd ZU dZded< i Zded< e ¡ Zddddd d	œd
d„Z	dd„ Z
dd„ Zdd„ ZdS )ÚsymbolaI  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.

    r(   rb   zDict[str, symbol]ÚsymbolsNrW   r™  )rb   rV  Ú	canonicalr*   c                 C  s¨   | j �Ž | j |¡}|d u rbt|tƒs*J ‚|d u r:t|ƒ}t t|¡}||_	|rV||_
|| j|< n |r‚||kr‚td|›d|› �ƒ‚|W  d   ƒ S 1 sš0    Y  d S )Nz#Can't replace canonical symbol for z with new int value )Ú_lockrÌ  rÙ   rT   r(   Úhashr‡   Ú__new__rË  rb   rG   rÚ   )rJ   rb   rV  rÍ  r…   r/   r/   r0   rÐ  O  s$    ÿÿzsymbol.__new__c                 C  s   t | jdt| ƒffS )Nr)   )rË  rb   r‡   r9   r/   r/   r0   Ú
__reduce__m  s    zsymbol.__reduce__c                 C  s   t | ƒS r6   r  r9   r/   r/   r0   Ú__str__p  s    zsymbol.__str__c                 C  s   d| j ›d�S )Nzsymbol(r–   ©rb   r9   r/   r/   r0   Ú__repr__s  s    zsymbol.__repr__)NN)rD   rE   rF   rG   rI   rÌ  r©  rª  rÎ  rÐ  rÑ  rÒ  rÔ  r/   r/   r/   r0   rË  ;  s   
  ürË  c                   @  s0   e Zd Zddddddœdd„Zd	d
œdd„ZdS )Ú_IntFlagMetar(   zTuple[Type[Any], ...]r²   r   r4   )Ú	classnamery   Údict_r)  r*   c           	      K  sˆ   g  | _ }| ¡ D ]Z\}}t d|¡r(qt|tƒr@t||d�}n| d¡stdƒ‚nqt	| ||ƒ | 
|¡ qt dd„ |D ƒ¡| _d S )Nz^__.*__$)rÍ  r+  z#Expected integer values for IntFlagc                 S  s   i | ]}|j |“qS r/   rÓ  )r[   r…   r/   r/   r0   Ú
<dictcomp>Ž  r^   z)_IntFlagMeta.__init__.<locals>.<dictcomp>)Z_itemsr  r`   ÚmatchrT   r‡   rË  r;  rÚ   rB  rt   r   ZimmutabledictÚ__members__)	rJ   rÖ  ry   r×  r)  r  r   Úvr…   r/   r/   r0   rº   x  s    



ÿz_IntFlagMeta.__init__zIterator[symbol]r5   c                 C  s   t dƒ‚d S )Nz“iter not implemented to ensure compatibility with Python 3.11 IntFlag.  Please use __members__.  See https://github.com/python/cpython/issues/99304r]  r9   r/   r/   r0   Ú__iter__‘  s    ÿz_IntFlagMeta.__iter__N)rD   rE   rF   rº   rÜ  r/   r/   r/   r0   rÕ  w  s   rÕ  c                   @  s   e Zd ZdZdS )Ú_FastIntFlagzÆAn 'IntFlag' copycat that isn't slow when performing bitwise
    operations.

    the ``FastIntFlag`` class will return ``enum.IntFlag`` under TYPE_CHECKING
    and ``_FastIntFlag`` otherwise.

    NrG  r/   r/   r/   r0   rÝ  ™  s   rÝ  )Ú	metaclass)ÚIntFlagÚ_EzDict[_E, List[Any]]zOptional[_E])r  Úchoicesrb   Úresolve_symbol_namesr*   c                 C  sn   |  ¡ D ]>\}}| |u r |  S |r6| |jkr6|  S | |v r|  S q| du rTdS t d|› d| ›�¡‚dS )aO  Given a user parameter, parse the parameter into a chosen value
    from a list of choice objects, typically Enum values.

    The user argument can be a string name that matches the name of a
    symbol, or the symbol object itself, or any number of alternate choices
    such as True/False/ None etc.

    :param arg: the user argument.
    :param choices: dictionary of enum values to lists of possible
        entries for each.
    :param name: name of the argument.   Used in an :class:`.ArgumentError`
        that is raised if the parameter doesn't match any available argument.

    NzInvalid value for 'z': )r  rb   r   r°  )r  rá  rb   râ  Z
enum_valueÚchoicer/   r/   r0   Úparse_user_argument_for_enum®  s    
rä  rc  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)r`  r/   r/   r0   Úset_creation_orderÓ  s    	ræ  )rà   rê   r
  r*   c                 O  s@   z| |i |¤ŽW S  t y:   tdt ¡ dd…  ƒ Y n0 dS )zXexecutes the given function, catches all exceptions and converts to
    a warning.

    z%s('%s') ignoredr   r   N)rU   Úwarnr7   r8   )rà   rê   r
  r/   r/   r0   Úwarn_exceptionà  s    rè  é   c                 C  sD   z(t | ƒ|kr d| d|…  W S | W S W n ty>   |  Y S 0 d S )Nz%s...r   )rœ   rÚ   )r=   Zlen_r/   r/   r0   Úellipses_stringë  s    
rê  c                      sT   e Zd ZU dZded< dddd dœ‡ fdd„Zdd	œd
d„Zdddœ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,


    r‡   Ú_hashr(   úSequence[Any])r=   Únumrê   r*   c                   s<   || d|  }t ƒ  | |¡}td|t|ƒ| f ƒ|_|S )Nz6 (this warning may be suppressed after %d occurrences)z%s_%d)rº  rÐ  rÏ  rì  )rJ   r=   rî  rê   Zinterpolatedr:   r»  r/   r0   rÐ    s    ÿz_hash_limit_string.__new__r5   c                 C  s   | j S r6   )rì  r9   r/   r/   r0   Ú__hash__  s    z_hash_limit_string.__hash__r   re   )Úotherr*   c                 C  s   t | ƒt |ƒkS r6   )rÏ  )r:   rð  r/   r/   r0   Ú__eq__  s    z_hash_limit_string.__eq__)	rD   rE   rF   rG   rI   rÐ  rï  rñ  r¼  r/   r/   r»  r0   rë  õ  s
   


rë  )Úmsgr­   r*   c                 C  s(   |rt tj| |d�ƒ nt | tjƒ dS )zdIssue a warning.

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

    )r­   N)Ú_warnings_warnr   Ú	SAWarning)rò  r­   r/   r/   r0   rç    s    rç  rí  )rò  rê   r*   c                 C  s    |rt | d|ƒ} t| tjƒ dS )z\Issue a warning with a parameterized string, limiting the number
    of registrations.

    é
   N)rë  ró  r   rô  )rò  rê   r/   r/   r0   Úwarn_limited   s    rö  z)Dict[CodeType, Tuple[str, Type[Warning]]]Ú_warning_tagszType[Warning]zCallable[[_F], _F])ÚmessageÚcategoryr*   c                   s   ‡ ‡fdd„}|S )Nc                   s   ˆˆ ft | j< | S r6   )r÷  rÌ   ru  ©rù  rø  r/   r0   Úgo0  s    z#tag_method_for_warnings.<locals>.gor/   )rø  rù  rû  r/   rú  r0   Útag_method_for_warnings-  s    rü  z&^(?:sqlalchemy\.(?!testing)|alembic\.)zUnion[str, Warning]zOptional[Type[Warning]])rø  rù  Ú
stacklevelr*   c                 C  sê   zt  |¡}W n$ ty$   d}Y n’   d}Y n„0 d }}|d ur¶|sbt t|j dd¡¡sbd}|jt	v r–d}t	|j \}}|p„|}| › d|› d�} |j
}|sª|d7 }q<|r<|r<q¶q<|d urÔtj| ||d d	� ntj| |d d	� d S )
Nr   FrD   r•   Tz (r–   r   )rý  )r7   Ú	_getframer“  r`   rÙ  Ú_not_sa_patternÚ	f_globalsrÙ   Úf_coder÷  Úf_backÚwarningsrç  )rø  rù  rý  ÚframeZstacklevel_foundZwarning_tag_foundZ_suffixZ	_categoryr/   r/   r0   ró  :  s2    
ÿ

ró  r  zCallable[..., Optional[_T]])rˆ   Úretry_on_exceptionr*   c                   s$   ˆ g‰ddddœ‡ ‡‡fdd„}|S )zNDecorate the given function to be a no-op after it is called exactly
    once.r   zOptional[_T]©r  r)  r*   c                    sD   ˆ }ˆr@ˆ  ¡ }z|| i |¤ŽW S    ˆr8ˆ d|¡ ‚ Y n0 d S )Nr   )rL   Úinsert)r  r)  Z	strong_fnZonce_fn©rˆ   Úoncer  r/   r0   rû  u  s    zonly_once.<locals>.gor/   )rˆ   r  rû  r/   r  r0   Ú	only_oncem  s    r
  z%sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.pyzunit(?:2|test2?/)zre.Pattern[str])ÚtbÚexclude_prefixÚexclude_suffixr*   c                 C  s`   d}t | ƒd }||kr0| | | ¡r0|d7 }q||krP| | | ¡rP|d8 }q0| ||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)r  r  r  rp   Úendr/   r/   r0   Úchop_traceback‹  s    

r  c                 C  s$   d|  }t ƒ  ¡ }t||ƒ |d S )Nz&def set(obj, value):    obj.%s = valuerK   )rA  Úcopyr³   )Úattrnamer­   r®   r/   r/   r0   Ú
attrsetter¨  s    

r  z^__.+__$c                      s*   e Zd ZdZdZddœ‡ fdd„Z‡  ZS )Ú
TypingOnlyz“A mixin class that marks a class as 'typing only', meaning it has
    absolutely no methods, attributes, or runtime functionality whatsoever.

    r/   r4   r5   c                   sB   t | jv r4dd„ | jD ƒ}|r4td| › d|› d�ƒ‚tƒ  ¡  d S )Nc                 S  s   h | ]}t  |¡s|’qS r/   )Ú_dundersrÙ  ©r[   rb   r/   r/   r0   Ú	<setcomp>¼  s   z/TypingOnly.__init_subclass__.<locals>.<setcomp>zClass z< directly inherits TypingOnly but has additional attributes rÁ   )r  rÛ   rØ   ÚAssertionErrorrº  Ú__init_subclass__)rJ   Ú	remainingr»  r/   r0   r  º  s    
ÿÿÿzTypingOnly.__init_subclass__)rD   rE   rF   rG   rH   r  r¼  r/   r/   r»  r0   r  ²  s   r  c                      sD   e Zd ZU dZded< ddœ‡ fdd„Zeddd	œd
d„ƒZ‡  ZS )ÚEnsureKWArga6  Apply translation of functions to accept \**kw arguments if they
    don't already.

    Used to ensure cross-compatibility with third party legacy code, for things
    like compiler visit methods that need to accept ``**kw`` arguments,
    but may have been copied from old code that didn't accept them.

    r(   Úensure_kwargr4   r5   c                   sf   | j }| j}|rX|D ]B}t ||¡}|r|| }t |¡}|js|  |¡}t| ||ƒ qt	ƒ  
¡  d S r6   )r  rØ   r`   rÙ  r   r›   rì   Ú
_wrap_w_kwrB  rº  r  )rJ   Zfn_regZclsdictr5  r.   rˆ   r©   Úwrappedr»  r/   r0   r  Ú  s    

zEnsureKWArg.__init_subclass__rd   r�   c                   s    ddddœ‡ fdd„}t |ˆ ƒS )Nr   r  c                    s   ˆ | Ž S r6   r/   )r  r)  ru  r/   r0   Úwrapê  s    z$EnsureKWArg._wrap_w_kw.<locals>.wrapr   )rJ   rˆ   r  r/   ru  r0   r  è  s    zEnsureKWArg._wrap_w_kw)	rD   rE   rF   rG   rI   r  rj  r  r¼  r/   r/   r»  r0   r  Ç  s
   
		r  c                 C  sj   t |dƒrt| |ƒS | }|jj|_t |dƒr4|j|_t |jdƒrT|jjrT|jj|_n|jrb|j|_|S dS )z‘Augment functools.update_wrapper() to work with objects with
    a ``__call__()`` method.

    :param fn:
      object with __call__ method

    rD   rE   rG   N)rs   r   ri   rD   rE   ræ   rG   )Úwrapperrˆ   Ú_fr/   r/   r0   Úwrap_callableð  s    



r"  )r•  rp   r*   c                 C  s  | | dksJ dƒ‚d}d}d}t | ƒ}|}||k �r| | }|rv|dkrø|d |k rp| |d  dkrp|d7 }q,d}n‚|r®|dkrø|d |k r¨| |d  dkr¨|d7 }q,d}nJ|dkr¼d	}n<|dkrÊd	}n.|dkrÜ|d7 }n|d
krø|d8 }|dkrø|S |d7 }q,dS )a  Return the index of the ``)`` that matches the ``(`` at ``start``.

    The walk skips single-quoted (``'...'``) and double-quoted (``"..."``)
    string literals, so parentheses inside string literals do not affect
    the depth counter. ``''`` and ``""`` are treated as escaped quotes
    inside their respective contexts, matching PostgreSQL/SQLite literal
    conventions.

    Returns ``None`` if the opening parenthesis is never closed
    (unbalanced).  The character at ``text[start]`` must be ``(``.

    Note for SQLite use, SQLite also supports MySQL backtick-style quotes as
    well as SQL Server bracket style quotes; the latter has different escaping
    behaviors.  A follow-up patch could add support for these two additional
    styles (consider using an enum like QuotingStyle.DOUBLE |
    QuotingStyle.BRACKET, etc.)

    E.g.::

        >>> find_matching_paren("(a + b)")
        6
        >>> find_matching_paren("((a)(b))")
        7
        >>> find_matching_paren("(a = '(' AND b = ')')")
        20

    ú(z'start index must point at an open parenr   Fú'r   r   ú"Tr–   N©rœ   )r•  rp   ÚdepthZ	in_singleZ	in_doubler\   r{   Úchr/   r/   r0   Úfind_matching_paren  s@    


r)  c                 C  sb   |   ¡ }t|ƒ}|dk s0|d dks0|d dkr4| S t|dƒ}|dur^||d kr^|dd… S | S )am  Remove one layer of outer parentheses from ``text`` if they wrap the
    entire (stripped) string.

    Whitespace is preserved if the parentheses do not wrap the whole
    expression. String literals are honored via :func:`find_matching_paren`,
    so ``"(a = '(' AND b = ')')"`` correctly strips to
    ``"a = '(' AND b = ')'"`` rather than being interpreted as two separate
    paren groups.

    E.g.::

        >>> strip_outer_parens("(a IS NOT NULL)")
        'a IS NOT NULL'
        >>> strip_outer_parens("(a) AND (b)")
        '(a) AND (b)'
        >>> strip_outer_parens("a NOT NULL")
        'a NOT NULL'

    r   r   r#  rû   r–   Nr   )r’  rœ   r)  )r•  ÚstrippedZ	lstrippedÚcloser/   r/   r0   Ústrip_outer_parensG  s     
r,  c                 C  sÈ   d| vr|   d¡S d}g g}d}t| ƒ}||k rº| | }|dkr†|dkr|||d k r|| |d  dkr||d  d¡ |d7 }q°|dN }n*|dkr¢|dkr¢| g ¡ n|d  |¡ |d7 }q(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']

    r%  rÁ   r   r   rû   c                 S  s   g | ]}d   |¡‘qS )r•   )r_   )r[   rÅ   r/   r/   r0   r  Ž  r^   z'quoted_token_parser.<locals>.<listcomp>)rÃ   rœ   rt   )r=   r&  ro  ÚidxÚlvÚcharr/   r/   r0   Úquoted_token_parsere  s$    
$


r0  )Úparamsr•  r*   c                   s   t  ˆ ¡‰ ‡ ‡fdd„}|S )Nc                   s:   | j d ur| j pd}|r0t|‡fdd„ˆ D ƒƒ}|| _ | S )Nr•   c                   s   i | ]
}|ˆ “qS r/   r/   )r[   Úparamr–  r/   r0   rØ  —  r^   z8add_parameter_text.<locals>.decorate.<locals>.<dictcomp>)rG   Úinject_param_text)rˆ   rV  ©r1  r•  r/   r0   r°   ”  s
    z$add_parameter_text.<locals>.decorate)r   r  )r1  r•  r°   r/   r4  r0   Úadd_parameter_text‘  s    
r5  c                 C  sN   |   dd¡}t|ƒdkr| S |\}}| d¡s@|d t |¡ S t | ¡S d S )NÚ
r   rY   )rÃ   rœ   r;  ÚtextwrapÚdedent)r•  Z
split_textÚ	firstliner  r/   r/   r0   Ú_dedent_docstringž  s    
r:  )Úgiven_doctextÚ
injecttextÚposr*   c                 C  sª   t | pdƒ}| d¡}t|ƒdkr,| d¡ t |¡ d¡}|d rP| dd¡ dd„ t|ƒD ƒ}| dd¡ |t|t|ƒd ƒ }|d|… | ||d …  }d 	|¡S )Nr•   r6  r   r   c                 S  s   g | ]\}}|  ¡ s|‘qS r/   )r’  )r[   rî  Úliner/   r/   r0   r  µ  r^   z)inject_docstring_text.<locals>.<listcomp>)
r:  rÃ   rœ   rt   r7  r8  r  r  Úminr_   )r;  r<  r=  ÚdoctextÚlinesZinjectlinesZblanksZ
inject_posr/   r/   r0   Úinject_docstring_textª  s    

rB  z(\s+):param (.+?):zDict[str, str])r@  Úinject_paramsr*   c           
      C  s  t  |  ¡ ¡}g }d }|�r| ¡ }t |¡}|d u r |rö| d¡ d¡}||v rödt| d¡ƒ d }|r’t	 d|d ¡}	|	r’dt|	 d¡ƒ }|||  }nV|rº| 
d|dg¡ d }n<| ¡ sØ| 
||dg¡ d }n| d¡rö| 
|| ¡ g¡ q| |¡ qd |¡S )	Nr   Ú*rY   r   z(\s+)\Sr   r6  z::)ÚcollectionsÚdequeÚ
splitlinesÚpopleftÚ
_param_regrÙ  r·   Úlstriprœ   r`   rN   Úrstripr<  rt   r_   )
r@  rC  ZdoclinesrA  Z	to_injectr>  r.   r2  ÚindentÚm2r/   r/   r0   r3  Á  s6    

r3  )rª   r*   c                 C  s‚   t | ƒdkrdS t | ƒdk}|r,| dd… n| dd… | dd…  } dd„ | D ƒ}|r`d |¡S d	d |dd… ¡|d f S dS )
zŒTrims a list of strings from the middle and return a string of up to
    four elements. Strings greater than 11 characters will be truncatedr   Nrð   r‘   rû   c                 S  s,   g | ]$}t |ƒd kr$d|dd …  n|‘qS )é   z%s..Nr&  r  r/   r/   r0   r  ó  r^   z$repr_tuple_names.<locals>.<listcomp>r  z%s, ..., %s)rœ   r_   )rª   ÚflagÚresr/   r/   r0   Úrepr_tuple_namesì  s    (
rQ  c                 C  s   t rdS | rtdƒ‚ndS d S )NTzDcython extensions were expected to be installed, but are not presentF)r   ÚImportError)Zraise_r/   r/   r0   Úhas_compiled_extú  s    ÿrS  c                   @  s   e Zd Ze ¡ ZdS )Ú_MissingN)rD   rE   rF   ÚenumÚautoÚMissingr/   r/   r/   r0   rT  	  s   rT  )N)FF)T)T)r/   r/   r/   r/   )r/   Nr/   )NNr7  N)NNN)TN)N)F)ré  )N)Nr   )r   )F)œrG   Ú
__future__r   rE  rU  Ú	functoolsr   r˜   r   rI  r`   r7   r7  r©  r¤   r   Útypingr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r•   r   r   Z_has_cyr   r   r   r   r    r"   r$   r%   r&   r'   r1   r2   rR   rV   rc   rl   rw   r†   rŠ   r‹   r±   r¦   r´   rµ   r¶   rÓ   r×   râ   rï   r    r  r	  r  r  r!  r"  r2  r6  rE  rF  rQ  rR  rS  rk  rm  r‚  Znon_memoized_propertyÚpropertyZro_memoized_propertyZro_non_memoized_propertyrw  rx  Z!HasMemoized_ro_memoized_attributer€  rƒ  r”  r˜  rš  r�  r¡  r£  r¦  r®  r±  rM  r¹  r½  rÆ  rÊ  r‡   rË  rh   rÕ  rÝ  rß  ZFastIntFlagÚEnumrà  rä  rå  ræ  rè  rê  r(   rë  rç  rö  r÷  rI   rü  Úcompilerÿ  ró  r
  Z_SQLA_REZ_UNITTEST_REr  ZNoneTyper  r  r  r  r"  r)  r,  r0  r5  r:  rB  rI  r3  rQ  rS  rT  rW  Z	MissingOrr/   r/   r/   r0   Ú<module>	   sf  ;ÿ	`+üÿÿ5ÿ=ÿu%   ù  üN,   ú
CV+M1 ûÿ#<"
ü"



 ý 3ý )?,+