� l\�gt��� �UdZddlmZddlZddlZddlmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddl$Z$ddl%m&Z&ddl%m'Z'ddl(m)Z)ddlm*Z*ddl%m+Z+e"d ��Z,e"d!d"�#��Z-e"d$ed%ef�&��Z.e"d'd(�&��Z/e"d)d*�&��Z0e"d+d,�&��Z1e"d-d.�&��Z2e'j3r�dd3�Z4n�dd4�Z4�dd7�Z5Gd8�d9��Z6�dd=�Z7�dd?�Z8 �d�ddC�Z9�ddI�Z:�ddM�Z;�ddR�Z<�d dX�Z=e"dYdG�&��Z>�d!d\�Z?d]�Z@�d"dc�ZAe"dd��ZBe"de��ZCGdf�dg��ZDdh�ZEedd%di��d#dp���ZFeddqdi��d$dr���ZFddqdi��d$ds�ZF�d%dv�ZG �d&�d'dz�ZH �d(�d)d~�ZI�d(d�ZJ �d*�d+d��ZKd��ZLd��ZM �d,�d-d��ZNGd��d���ZOd��ZPd��ZQ �d.d��ZRd��ZS�d/d��ZTe"d�d��&��ZUGd��d�ee-��ZVGd��d�eVe-��ZWGd��d�eVe-��ZXe!r eVZYeVZZe[Z\e[Z]neXxZYZ\eWxZZZ]�d0d��Z^Gd��d���Z_e!re[Z`ne_jaZ`Gd��d���Zb�d1d��Zc�d2d��Zd�d3d��Ze �d4�d5d��Zf�d6d��Zg�d7d��Zh�d8d��Zi �d�d9d��Zj�d:dÄZkdĄZlGdńd�e[��ZmGdDŽd�ee,��ZnGdɄd�ee,��ZoGd˄d�ee,��ZpGd̈́d�eq��ZrGdτd�es��ZtGdфd�et�Ӧ�Zue!r dd�lmvZvevZwneuZwe"d�ejx�&��Zy �d;�d<dڄZzda{�d=d܄Z|�d>dބZ}�d?d��Z~Gd�d�e��Z��d�d@d�Z��dAd�Z�iZ�d�e�d�<�dBd�Z�e j�d��Z� �dC�dDd�Z��dEd��Z�e j�d���Z�e j�d���Z�e�e�f�dFd��Z�esd��Z�d��Z�e j�d���Z�G�d��d��Z�G�d��d��Z��d�Z��d�Z��dG�d�Z��dH�d�Z��dI�d �Z�e j��d ��Z��dJ�d�Z��dK�d�Z��d;�d�Z�G�d��dejx��Z�e�j�Z�e#e,e*e�j�fZ�dS(Lz�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)�Mapping)�NoReturn)�Optional)�overload)�Sequence)�Set)�Tuple)�Type)� TYPE_CHECKING)�TypeVar)�Union�)� _collections)�compat)�HAS_CYEXTENSION)�Literal�)�exc�_T�_T_coT)� covariant�_F.)�bound�_MPzmemoized_property[Any]�_MAz#HasMemoized.memoized_attribute[Any]�_HPzhybridproperty[Any]�_HMzhybridmethod[Any]�objr�return�Mapping[str, Any]c�*�tj|��S�N)�inspect�get_annotations�r*s �k/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.pyr0r0As���&�s�+�+�+�c���t|t��r|j�dd��}nt |dd��}|� t jStd|��S)N�__annotations__r,)� isinstance�type�__dict__�get�getattrr� EMPTY_DICTr )r*�anns r2r0r0Fsa�� �c�4� � � 8��,�"�"�#4�d�;�;�C�C��#�0�$�7�7�C� �;��*� *��+�S�1�1� 1r3�x�strc���|�d��}tj��}|�|��t t |�����S)Nzutf-8)�encoder�md5_not_for_security�updater r>� hexdigest)r=�ms r2�md5_hexrEWsH�� ������A��#�%�%�A��H�H�Q�K�K�K� ��Q�[�[�]�]� #� #�#r3c�2�eZdZUdZdZded<dd�Zdd�ZdS)� safe_reraiseaReraise 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]]rHr+�Nonec�6�tj��|_dSr.)�sys�exc_inforH��selfs r2� __enter__zsafe_reraise.__enter__�s���������r3�type_�Optional[Type[BaseException]]�value�Optional[BaseException]� traceback�Optional[types.TracebackType]rc��|j�J�|�+|j\}}}|�J�d|_|�|���d|_|�J�|�|���r.)rH�with_traceback)rNrPrRrT�exc_type� exc_value�exc_tbs r2�__exit__zsafe_reraise.__exit__�ss�� �~�)�)�)� �=�*.�.� '�H�i���(�(�(�!�D�N��*�*�6�2�2� 2�!�D�N��$�$�$��&�&�y�1�1� 1r3N�r+rI)rPrQrRrSrTrUr+r)�__name__� __module__� __qualname__�__doc__� __slots__r5rOr[�r3r2rGrG^sc���������0�I�����(�(�(�(�2�2�2�2�2�2r3rG�cls�Type[_T]�Iterator[Type[_T]]c#��K�t��}|g}|r]|���}||vr�|�|��|�|�����|V�|�[dSdSr.)�set�pop�add�extend�__subclasses__)rc�seen�stacks r2�walk_subclassesrn�s������U�U�D� �E�E� ���i�i�k�k�� �$�;�;� � �H�H�S�M�M�M� � � �S�'�'�)�)�*�*�*�� � � � �����r3�elementc�z�t|t��r|S t|��S#t$rd|zcYSwxYw)Nzunprintable element %r)r6r>� Exception)ros r2�string_or_unprintablerr�sV���'�3���6��� 6��w�<�<� ��� 6� 6� 6�+�g�5� 5� 5� 5� 6���s �(�:�:� Type[Any]�use_name� Optional[str]c�x�|p|j}d�d�tjd|��D����S)N� c3�>K�|]}|���V��dSr.)�lower)�.0�ns r2� <genexpr>z(clsname_as_plain_name.<locals>.<genexpr>�s*����N�N�!�A�G�G�I�I�N�N�N�N�N�Nr3z([A-Z][a-z]+|SQL))r]�join�re�findall)rcrt�names r2�clsname_as_plain_namer��s>�� � #�s�|�D� �8�8�N�N�r�z�2F��'M�'M�N�N�N� N� N�Nr3�instance_or_cls�Union[Type[Any], object]�against_method�Callable[..., Any]�boolc�z�t|t��s|j}n|}|j}t ||��}||kS)z1Return True if the two class methods don't match.)r6r7� __class__r]r:)r�r�� current_cls� method_name�current_methods r2�method_is_overriddenr��sG�� �o�t� ,� ,�&�%�/� � �%� � �)�K�'.�{�K�'H�'H�N� �^� +�+r3�slc�slice�Tuple[Any, ...]c���g}|j|j|jfD];}t|d��r|���}|�|���<t |��S)zrdecode a slice object as sent to __getitem__. takes into account the 2.5 __index__() method, basically. � __index__)�start�stop�step�hasattrr��append�tuple)r��retr=s r2� decode_slicer��sa�� �C� �Y���#�(� *���� �1�k� "� "� �� � � � �A� � � �1� � � � � ��:�:�r3�used� Sequence[str]�bases� Iterator[str]c '��K�t|��}|D]l�tj�ft�fd�t d������}|D]!}||vr|�|��|V�n�"t d�z����mdS)Nc�(���t|��zSr.�r>)�i�bases �r2�<lambda>z!_unique_symbols.<locals>.<lambda>�s���$��Q���-�r3i�z&exhausted namespace for symbol base %s)rg� itertools�chain�map�rangeri� NameError)r�r��used_set�pool�symr�s @r2�_unique_symbolsr��s�������4�y�y�H�� M� M���� �G� �'�'�'�'��t��� 5� 5� � ��� M� M�C��(�"�"�� � �S�!�!�!�� � � ���#� �D�t�K�L�L� L�� M� Mr3�fn�Callable[[int], Any]r{�int� Iterator[Any]c#�LK�|r||dzz}||��V�||z}|�dSdS)z6Call the given function given each nonzero bit from n.rNrb)r�r{�bs r2�map_bitsr��sW���� �� �!��a��L���b��e�e� � � � �Q��� �����r3�_Fn�target�Callable[[_Fn], _Fn]c�0��d�fd� }t|���S)z'A signature-matching decorator factory.r�r�r+c����tj|��s#tj|��std���t j|��}i}t ||��}ttd|d����td|dd���z|j fz}t|dd��\}}t||���}|� t|d � ����|j |d <tj|��r d |d <d|d<n d|d <d|d<dt|d��vrd|z}nd|z}t j|j}|� t'|����|� |� ||d|ji��tt(jt-|||j ����} t/|d|��j| _|| _t5| |��S)Nznot a decoratable functionzTuple[str, ...]rr�r�r�)r�r�F��groupedr�zasync �prefixzawait � target_prefix��__zf%(prefix)sdef %(name)s%(grouped_args)s: return %(target_prefix)s%(target)s(%(fn)s, %(apply_pos)s) ze%(prefix)sdef %(name)s%(grouped_args)s: return %(target_prefix)s%(target)s(%(fn)s, %(apply_kw)s) r]�__func__)r/� isfunction�ismethodrqr�inspect_getfullargspec�!_update_argspec_defaults_into_envr�r r]r��dictrB�format_argspec_plus�iscoroutinefunction�reprrK�modulesr^�vars�types� FunctionType�_exec_code_in_envr:� __defaults__� __wrapped__r) r��spec�env�names� targ_name�fn_name�metadata�code�mod� decoratedr�s �r2�decoratezdecorator.<locals>.decorate�s����!�"�%�%� :�g�.>�r�.B�.B� :��8�9�9� 9��,�R�0�0�� ��0��s�;�;�� �$�(�$�q�'�2�2� 3� 3��$�d�1�Q�3�i�0�0� 1��{�n� � � -�U�H�d�C�C�� �7�-1��w�-O�-O�-O�����+�D�%�@�@�@�A�A�A��;���� � &�r� *� *� +�!)�H�X� �(0�H�_� %� %�!#�H�X� �(*�H�_� %� �4��Q��=�=� � ��� � �D��� � ��k�"�-�(�� � � �4��9�9���� � � �I�v�w��J�� �N�O�O�O�� � � �d�C��� 5� 5� � � �")��Z��!<�!<�!I� �� "� ���i��,�,�,r3)r�r�r+r�r)r�r�s` r2� decoratorr��s4���?-�?-�?-�?-�?-�?-�B �(�F� +� +�+r3c�.�|jr�g}d}|jD]R}t|��jdvr%d|z}|||<|�|��|dz }�=|�|���St |��}t |��|d<t j|�S|S)zCgiven a FullArgSpec, convert defaults to be symbol names in an env.r)�builtins� __builtin__zx%drr�)�defaultsr7r^r��listr�r� FullArgSpec)r�r�� new_defaultsr��argr��elems r2r�r�=s��� �}��� � ���=� )� )�C��C�y�y�#�+F�F�F��q�y����D� ��#�#�D�)�)�)��Q�����#�#�C�(�(�(�(��D�z�z��� �%�%��Q���!�4�(�(�� r3r��Union[str, types.CodeType]r��Dict[str, Any]r�c�2�t||��||Sr.)�exec)r�r�r�s r2r�r�Rs�� ��s�O�O�O� �w�<�r3�_PF�_TEc�0�eZdZ ddd�Zd�Zdd �Zdd�ZdS)� PluginLoaderN�groupr>�auto_fn�Optional[Callable[..., Any]]c�0�||_i|_||_dSr.)r��implsr�)rNr�r�s r2�__init__zPluginLoader.__init__^s���� �%'�� ��� � � r3c�8�|j���dSr.)r��clearrMs r2r�zPluginLoader.cleares�� � �������r3r�r+rc�x�||jvr|j|��S|jr+|�|��}|r||j|<|��Stj|j��D]2}|j|kr%|j|j|<|���cS�3tjd|j�d|�����)NzCan't load plugin: �:) r�r�r�importlib_metadata_getr�r��loadr �NoSuchModuleError)rNr��loader�impls r2r�zPluginLoader.loadhs��� �4�:� � �#�4�:�d�#�%�%� %� �<� ��\�\�$�'�'�F�� �#)�� �4� ��v�x�x���1�$�*�=�=� #� #�D��y�D� � �#'�9�� �4� ��y�y�{�{�"�"�"�!��#�#�*.�*�*�*�d�d� ;� � � r3� modulepath�objnamerIc�*�����fd�}||j|<dS)Nc���t���}��d��dd�D]}t||��}�t|���S)N�.r)� __import__�splitr:)r��tokenr�r�s ��r2r�z#PluginLoader.register.<locals>.load|sW����Z�(�(�C�#�)�)�#�.�.�q�r�r�2� *� *���c�5�)�)����3��(�(� (r3)r�)rNr�r�r�r�s `` r2�registerzPluginLoader.register{s6���� )� )� )� )� )� )�  �� �4���r3r.)r�r>r�r�)r�r>r+r)r�r>r�r>r�r>r+rI)r]r^r_r�r�r�rrbr3r2r�r�]sg������BF��������� � � � �& � � � � � r3r�c� � tj}|j}|j}t |jd|���t |j|z��fS#t$r4tj |��}|dt |d��fcYSwxYw)Nrr) r/�CO_VARKEYWORDS�__code__� co_argcountr�� co_varnamesr��co_flags�AttributeErrorrr�)r��co_varkeywords�co�nargsr�s r2�_inspect_func_argsr�s��� � �/���[����� ������'� (� (� ���~�-� .� .� � �� �&�&�&� �,�R�0�0���A�w��T�!�W� � �%�%�%�%� &���s� A�;B � B )�_set�raiseerrr7r�Optional[Set[str]]r� Literal[True]�Set[str]c��dSr.rb�rcrrs r2�get_cls_kwargsr�s �� �sr3Fc��dSr.rbrs r2rr�s ���r3c���|du}|rt��}|�J�|j�dd��}|o8t|tj��ot|jtj��}|rCt|��\}}|� |��|s|s|rtd|�d����dSnd}|r|r|j D]}t||����n�|� d��|S)aeReturn 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)rrN)rgr8r9r6r�r�rrrrB� TypeError� __bases__r�discard) rcrr�toplevel�ctr�has_initr��has_kw�cs r2rr�s=��"�t�|�H����u�u�� � � � � �,� � �:�u� -� -�C� � 5� �s�E�.� /� /� 5� �s�|�U�^� 4� 4� � � �*�3�/�/� ��v� � � �E����� �h� �� ��F��F�F�F�����t���� ��v���� � �A��a�d�+�+�+�3���4� �L�L����� �Kr3�func� List[str]c�6�tj|��dS)z�Return the set of legal kwargs for the given `func`. Uses getargspec so is safe to call for methods, functions, etc. r)rr�)r!s r2�get_func_kwargsr$�s�� � (�� .� .�q� 1�1r3�no_self�_is_init�compat.FullArgSpecc ���tj|��rtd|z���tj|��rq|r[|rYt j|��}t j|jdd�|j|j |j |j |j |j ��St j|��Stj|��r�|rg|s|jr^t j|j��}t j|jdd�|j|j |j |j |j |j ��St j|j��Stj|��rt%|j|d���St)|d��rt j|j��St)|d��rAtj|j��rt%|j|���Std |z���td |z���) 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. zCan't inspect builtin: %srNT)r%r&r��__call__)r%zCan't inspect callable: %s)r/� isbuiltinrr�rr�r��args�varargs�varkwr�� kwonlyargs�kwonlydefaultsrr��__self__r��isclass�get_callable_argspecr�r�r))r�r%r&r�s r2r2r2�s�������*;��3�b�8�9�9�9� � �B� � �(;� � 5�� 5��0��4�4�D��%�� �!�"�"� �� �� �� ����#�� ��� ��0��4�4� 4� � �"� � �;� � >�� >�B�K� >��0���=�=�D��%�� �!�"�"� �� �� �� ����#�� ��� ��0���=�=� =� ��� � � ;�#� �K��4� � � � � ��Z� � �;��,�R�[�9�9�9� ��Z� � �;� � �B�K� (� (� ?�'�� �W�E�E�E� E��8�2�=�>�>� >��4�r�9�:�:�:r3�-Union[Callable[..., Any], compat.FullArgSpec]r��Dict[str, Optional[str]]c ���t|��rtj|��}n|}tj|�}tj|d|d|dd|d��}|drG|dd}tj|ddd�|d|dd|d��}n|drd|dz}|}nd}|}d}|dr6|t t t t|d����z }|dr|t |d��z }|d|dz}|r|d|z d�} nd} tj||d|d| d �� ��} |dr/tj|dd�|d|d| d �� ��} n| } |rt|||| || � ��St|||dd �| dd �|dd �| dd �� ��S)aReturns 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)'} rrrN�z%s[0]r�rbc�&�dt|��zS�N�=r��r=s r2r�z%format_argspec_plus.<locals>.<lambda>ss��c�C��F�F�l�r3)� formatvaluec�&�dt|��zSr8r�r:s r2r�z%format_argspec_plus.<locals>.<lambda>|s��#��A���,�r3)� grouped_args�self_arg� apply_pos�apply_kw�apply_pos_proxied�apply_kw_proxied�����) �callablerr��inspect_formatargspec�lenr rrr�) r�r�r�r+r?r>rA� num_defaults� name_args�defaulted_valsr@rBs r2r�r� sw��H��|�|���,�R�0�0����� � '�� .�D��,� �Q���a��$�q�'�4��a����I� �A�w�&���7�1�:��"�8� ��G�A�B�B�K��a��$�q�'�4��a�� � ��� �a��&��T�!�W�$��%�����%���L� �A�w�7���D��s��T�!�W�5�5�6�6�6� � �A�w�%���D��G� � �$� ��Q��$�q�'�!�I���"�1�|�#3�#5�#5�6������+�� �Q�� �Q���*�*� ���H� �A�w� $�!�7� �a�b�b�M� ��G� ��G� �.�.�  � � ���$��� ������/�-�  � � � ������"��o��a��d�^�/��"��5�-�a��d�3�  � � � r3c���|tjurd}|rdnd}|rdnd}n0 t||���S#t$rd}|r|nd}|rdnd }YnwxYwt 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)rNz()r�r�z(self, *args, **kwargs)zself, *args, **kwargsz(*args, **kwargs)z*args, **kwargs)r>r=r?r@rArB)�objectr�r�rr�)�methodr�r=r+�proxieds r2�format_argspec_initrN�s������ � �� �"�.�x�x���!�)�$�$�r��� L�&�v�w�?�?�?� ?��� L� L� L�4�L�#*�G�<�<�0G�D�-4�K�)�)�:K�G�G�G� L���� ��!���!� �  � � �s�0�A � A rb� target_cls�target_cls_sphinx_name�proxy_cls_sphinx_name� classmethods�methods� attributes�use_intermediate_variable�Callable[[_T], _T]c� �d�}|S)aSA 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��|Sr.rb)rcs r2r�z&create_proxy_methods.<locals>.decorate�s��� r3rb)rOrPrQrRrSrTrUr�s r2�create_proxy_methodsrY�s��&��� �Or3c�� tj|��S#t$r!|tjur dgdddfcYSdgdddfcYSwxYw)ainspect.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) rNNr+�kwargs)rr�rrKr�)rLs r2�getargspec_initr\�sn��6��,�V�4�4�4�� �6�6�6� �V�_� $� $��H�d�D�$�/� /� /� /��H�f�h��5� 5� 5� 5� 6���s��A�A�Ac�V�t|tj��r|js|jS|S)zSAdjust the incoming callable such that a 'self' argument is not required. )r6r�� MethodTyper0r�)� func_or_clss r2�unbound_method_to_callabler`�s2�� �+�u�/�0�0���9M���#�#��r3� additional_kw�Sequence[Tuple[str, Any]]� to_inspect�%Optional[Union[object, List[object]]]� omit_kwargc �h���|��g}ntj|��}t���g}tj��}d}t |��D�]%\}} t j|j��} | jrt| j��nd} |dkrW| j r| j }| r$|� | j d| ���nR|� | j dd���n/|� �fd�| j d| �D����| rI| jsJ�|� d�t| j | d�| j��D������#t$rY��#wxYwg} | � �fd�|D����|�=t!�|��r-| � d�t#�|��D����|���D]P\} } | |vr� t#�| ���}|�ur || kr| �| �d|�����A#t($rY�MwxYw|rN|D]K\} } t#�| ���}|�ur || kr| �| �d|�����<#t($rY�HwxYw�jj�d d �| ���d �S) z}Produce a __repr__() based on direct association of the __init__() specification vs. same-named attributes present. Nrrc���g|]}|�f��Srbrb)rzr��missings �r2� <listcomp>z generic_repr.<locals>.<listcomp>s���I�I�I��c�7�^�I�I�Ir3c��g|] \}}||f�� Srbrb)rzr��defaults r2riz generic_repr.<locals>.<listcomp>s0�����(�C���g����r3c3�T�K�|]"}tt�|d����V��#dSr.)r�r:)rzr�r*s �r2r|zgeneric_repr.<locals>.<genexpr>"s7�����D�D�C�$�w�s�C��.�.�/�/�D�D�D�D�D�Dr3c�,�g|]}t|����Srb�r�)rz�vals r2riz generic_repr.<locals>.<listcomp>%s��@�@�@�S�t�C�y�y�@�@�@r3r9�(�, �))r�to_listrK� OrderedDict� enumeraterr�r�r�rFr,rjr+rB�ziprr�r:�itemsr�rqr�r]r})r*rarcre�pos_args�kw_args�vargsr��inspr�� default_len�outputr��defvalrorhs` @r2� generic_reprr�sh�������U� � �!�)�*�5�5� ��h�h�G��H�2>�2J�2L�2L�G� �E��Z�(�(�����4� ��0���?�?�D�15� �D�#�d�m�,�,�,�1�K��A�v�v��<�)� �L�E��3��O�O�D�I�a�� �n�$=�>�>�>�>��O�O�D�I�a�b�b�M�2�2�2�2����I�I�I�I�t�y��K�<��/H�I�I�I����� ��}�$�$�}������,/� �I�{�l�m�m�4�d�m�-�-���������%� � � � �H� ����4�F� �M�M�D�D�D�D�8�D�D�D�D�D�D� ��W�S�%�0�0��� � �@�@�G�C��,?�,?�@�@�@�A�A�A��}�}����� ��V� �*� � � � ��#�s�G�,�,�C��'�!�!�c�V�m�m�� � ����c�c�2�3�3�3���� � � � �D� ������(� � �K�C�� ��c�3��0�0���g�%�%�#��-�-��M�M�S�S�S�#�#�"6�7�7�7���� � � ��� �����}�-�-�-�t�y�y��/@�/@�/@�/@� A�As6�E'�' E5�4E5�95H/�/ H<�;H<� 5I?�? J � J c�0�eZdZdZdZd�Zd�Zd d�Zd�ZdS) �portable_instancemethodz_Turn an instancemethod into a (parent, name) pair to produce a serializable callable. )r�r�r[� __weakref__c�,�|j|j|jd�S)N�r�r�r[r�rMs r2� __getstate__z$portable_instancemethod.__getstate__Es ���k��I��k� � � r3c�p�|d|_|d|_|�dd��|_dS)Nr�r�r[rb)r�r�r9r[)rN�states r2� __setstate__z$portable_instancemethod.__setstate__Ls1���H�o�� ��&�M�� ��i�i��"�-�-�� � � r3rbc�D�|j|_|j|_||_dSr.)r0r�r]r�r[)rN�methr[s r2r�z portable_instancemethod.__init__Qs���m�� ��M�� ��� � � r3c�v�|�|j��t|j|j��|i|��Sr.)rBr[r:r�r�)rNr��kws r2r)z portable_instancemethod.__call__Vs9�� � � �$�+����.�w�t�{�D�I�.�.��:�r�:�:�:r3N)rb) r]r^r_r`rar�r�r�r)rbr3r2r�r�=sf�������� :�I� � � �.�.�.� ���� ;�;�;�;�;r3r�c�*��|h�t|j��}|r�|���}�fd�|jD��}|D],}|�|����|���-|jdkst|d��s�t�fd�t|t��s|� ��n|� |��D��D],}|�|����|���-|��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. c3�$�K�|] }|�v�|V�� dSr.rb�rz�_�hiers �r2r|z"class_hierarchy.<locals>.<genexpr>js'�����9�9�q�1�D�=�=��=�=�=�=�9�9r3r�rkc���g|]}|�v�|�� Srbrbr�s �r2riz#class_hierarchy.<locals>.<listcomp>ss.��� � � �� ��}�}� � �}�}r3) r��__mro__rhrr�rir^r�� issubclassr7rk)rc�processr r�r��sr�s @r2�class_hierarchyr�[s?��� �5�D��3�;���G� �� �K�K�M�M��9�9�9�9�A�K�9�9�9��� � �A� �N�N�1� � � � �H�H�Q�K�K�K�K� �<�:� %� %�W�Q�8H�-I�-I� %� � � � � �"�!�T�*�*�)�� � �"�"�"��%�%�a�(�(�  � � � � �A� �N�N�1� � � � �H�H�Q�K�K�K�K�+ ��, ��:�:�r3c#�~K�t|��}|D](}|jD]}||jvr||j|fV�n��)dS)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�r8)rc�keys�keyr s r2�iterate_attributesr��sl���� �s�8�8�D������� � �A��a�j� � ��A�J�s�O�,�,�,�,���!���r3� self.proxyc����|r|}n ��d���fd�t|��D��}|D�]-} t||��}t|d��s�%t|d|��}ttj|��} n#t $rY�]wxYw tj| ��} tj | d��} tj | ddd���} n#t$rd} d } YnwxYwd t��z} |dur||ipi}t| |�� | j ||_ n#t $rYnwxYwt�|||����/dS) z9Automates delegation of __specials__ for a proxying type.N)ra�__del__�__getattribute__� __metaclass__r�r�c���g|]B}|�d��r+|�d��rt�|��s|�v�@|��CS)r�)� startswith�endswithr�)rzrD�into_cls�skips ��r2riz0monkeypatch_proxied_specials.<locals>.<listcomp>�sl���  �  �  ��� � �T�"�"�  � �J�J�t�$�$�  �  ��!�,�,�  ��T�M�M� � "�M�Mr3r)r�rrz(self, *args, **kw)z (*args, **kw)z?def %(method)s%(fn_args)s: return %(name)s.%(method)s%(d_args)s)r�r:r�r r�r�r rr�rEr�localsr�r��setattr)r��from_clsr��onlyr�� from_instance�dundersrL�maybe_fnr�r��fn_args�d_args�pyr�s` ` r2�monkeypatch_proxied_specialsr��s����� � ���� �<��D�  �  �  �  �  ���]�]�  �  �  ���/�/�� ��x��0�0�H��8�Z�0�0� ���x��X�>�>�H��e�(�(�3�3�B�B��� � � � �H� ���� %��0��4�4�D��2�4��7�;�;�G��1�$�q�'�!�"�"�+�>�>�F�F��� %� %� %�+�G�$�F�F�F� %����  3�5;�X�X� >� � �� %� ?�4��*?� E�2� � �R�� � � � �')��C��K� $� $��� � � � �D� ������&�#�f�+�.�.�.�.�?/�/s<� A;�+A;�; B�B� AC�C.�-C.�D0�0 D=�<D=c�F�t|d|��t|d|��uS)z;Return True if the two methods are the same implementation.r�)r:)�meth1�meth2s r2�methods_equivalentr��s0�� �5�*�e� ,� ,�� �z�5�1�1� �r3c �J�|s|std���t|t��rt||��r|St|pd�t |��D����}tt |����}t j}t|t��r|}n,|st��}t j}nt|��}||�|��|��r|St|t��s<|t jurdpd}t|�d|�dd� |�������Gd�d ��}|rd |j z|_ t��} t|��D]r\} } | |vrtd | z���t| ��st| �d | �d ����t|| t| ����| �| ���s|| |��r|Stdd� || z ��z���)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�<�g|]}|�d���|��S)r�)r�)rzrDs r2riz as_interface.<locals>.<listcomp>s)��M�M�M�a�1�<�<��;L�;L�M��M�M�Mr3zany ofzall ofz does not implement z: rqc��eZdZdZdS)�(as_interface.<locals>.AnonymousInterfacezA callable-holding shell.N�r]r^r_r`rbr3r2�AnonymousInterfacer�s������'�'�'�'r3r�� Anonymousz%r: unknown in this interfacer9z is not callablez,dictionary does not contain required keys %s)rr6r7rgr��operator�ge�gt� intersectionr�r}r]�dictlike_iteritemsrDr�� staticmethodri) r*rcrS�required� interface� implemented�complies� qualifierr��foundrLr�s r2� as_interfacer��sx��B �N�w�N��L�M�M�M��#�t�����C��!5�!5��� ��G�M�M�M�3�s�8�8�M�M�M�N�N�I��c�#�h�h�-�-�K��{�H��(�D�!�!�!���� �!��5�5���;����x�=�=���x� �(�(��3�3�X�>�>��� � �c�4� � � ��� �+�8��D�H� ���s�s�I�I�I�t�y�y��3�3�3� 5� � � � (�(�(�(�(�(�(�(� �A�&1�C�L�&@��#� �E�E�E�*�3�/�/��� ��� �� "� "��;�f�D�E�E� E���~�~� F��v�v�v�t�t�t�D�E�E� E��"�F�L��,>�,>�?�?�?� � � �&������x��x� � �"�!�!� �6� �)�)�H�u�$� %� %� &� � �r3�_GFDzgeneric_fn_descriptor[Any]c��eZdZUdZded<ded<ded<dd d �Zed!d���Zed"d���Zd#d�Zerd$d�Z d%d�Z d&d�Z e d'd���Z dS)(�generic_fn_descriptoragDescriptor 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. �Callable[..., _T_co]�fgetrur`r>r]N�docc�H�||_|p|j|_|j|_dSr.�r�r`r]�rNr�r�s r2r�zgeneric_fn_descriptor.__init__Ds$���� ��*�d�l�� �� �� � � r3rNr�r*rIrcrr+c��dSr.rb�rNr*rcs r2�__get__zgeneric_fn_descriptor.__get__Is��:=�#r3rKr"c��dSr.rbr�s r2r�zgeneric_fn_descriptor.__get__Ls��7:�sr3�Union[_GFD, _T_co]c��t���r.��NotImplementedErrorr�s r2r�zgeneric_fn_descriptor.__get__O���!�#�#�#r3�instancerRc��dSr.rb�rNr�rRs r2�__set__zgeneric_fn_descriptor.__set__T����r3c��dSr.rb)rNr�s r2� __delete__z generic_fn_descriptor.__delete__Vr�r3c��t���r.r��rNr*s r2�_resetzgeneric_fn_descriptor._resetXr�r3r�c��t���r.r��rcr*r�s r2�resetzgeneric_fn_descriptor.reset[s��!�#�#�#r3r.)r�r�r�ru)rNr�r*rIrcrr+r�)r*rKrcrr+r")rNr�r*rrcrr+r��r�rrRrr+rI�r�rr+rI)r*rr+rI)r*rr�r>r+rI)r]r^r_r`r5r�rr�rr�r�r�� classmethodr�rbr3r2r�r�5s�������������������M�M�M�&�&�&�&�&� �=�=�=��X�=� �:�:�:��X�:�$�$�$�$��9�A�A�A�A�8�8�8�8�$�$�$�$��$�$�$��[�$�$�$r3r�c� �eZdZdZesd�ZdSdS)�_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�4�|�|S|�|��Sr.�r�r�s r2r�z_non_memoized_property.__get__ks���{�� ��9�9�S�>�>� !r3N)r]r^r_r`rr�rbr3r2r�r�`sA�������� �"� "� "� "� "� "�"�"r3r�c�8�eZdZdZesd�Zd�Zed���ZdS)�_memoized_propertyz2A read-only @property that is only evaluated once.c�V�|�|S|�|��x|j|j<}|Sr.)r�r8r]�rNr*rc�results r2r�z_memoized_property.__get__vs.���{�� �37�9�9�S�>�>� A�C�L��� '�&��Mr3c�F�t�||j��dSr.)r�r�r]r�s r2r�z_memoized_property._reset|s ��� � ��d�m�4�4�4�4�4r3c�<�|j�|d��dSr.)r8rhr�s r2r�z_memoized_property.resets �� � ����t�$�$�$�$�$r3N) r]r^r_r`rr�r�r�r�rbr3r2r�r�qs[������<�<� �� � � � 5�5�5��%�%��[�%�%�%r3r�c�.���fd�}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�z����|g|�Ri|����fd�}�j|_�j|_||j�j<�S)Nc����Sr.rb��ar�r�s �r2�memoz6memoized_instancemethod.<locals>.oneshot.<locals>.memo�s����Mr3)r]r`r8�rNr+r�r�r�r�s @�r2�oneshotz(memoized_instancemethod.<locals>.oneshot�sc������D�&�4�&�&�&�2�&�&�� � � � � �� �� ��z�� �%)�� �b�k�"�� r3r)r�r�s` r2�memoized_instancemethodr��s.��� � � � � � �'�2� &� &�&r3c��eZdZUdZesdZe��Zded<dd�Z dd�Z dd �Z Gd�de e ��Zedd���ZdS)� HasMemoizedzA mixin class that maintains the names of memoized elements in a collection for easy cache clearing, generative, etc. rbzFrozenSet[str]�_memoized_keysr+rIc�P�|jD]}|j�|d���dSr.)rr8rh�rNr�s r2�_reset_memoizationszHasMemoized._reset_memoizations�s9���'� *� *�D� �M� � �d�D� )� )� )� )� *� *r3c�0�|jD] }||jvsJ��dSr.)rr8rs r2�_assert_no_memoizationsz#HasMemoized._assert_no_memoizations�s4���'� -� -�D��t�}�,�,�,�,�,� -� -r3r�r>rRrc�<�||j|<|xj|hzc_dSr.)r8r)rNr�rRs r2�_set_memoized_attributez#HasMemoized._set_memoized_attribute�s*��"�� �c�� ����u�$����r3c�r�eZdZUdZded<ded<ded<ddd �Zedd���Zedd���Zd�ZdS)�HasMemoized.memoized_attributezTA read-only @property that is only evaluated once. :meta private: �Callable[..., _T]r�rur`r>r]Nr�c�H�||_|p|j|_|j|_dSr.r�r�s r2r�z'HasMemoized.memoized_attribute.__init__�s$���D�I��.�$�,�D�L� �M�D�M�M�Mr3rNr'r*rIrcrr+c��dSr.rbr�s r2r�z&HasMemoized.memoized_attribute.__get__�s��<?�Cr3r!c��dSr.rbr�s r2r�z&HasMemoized.memoized_attribute.__get__�s��58�Sr3c��|�|S|�|��x|j|j<}|xj|jhzc_|Sr.)r�r8r]rr�s r2r�z&HasMemoized.memoized_attribute.__get__�sF���{�� �37�9�9�S�>�>� A�C�L��� '�&� � � �4�=�/� 1� � ��Mr3r.)r�r r�ru)rNr'r*rIrcrr+r')r*rrcrr+r!)r]r^r_r`r5r�rr�rbr3r2�memoized_attributer �s�������� � � ��������� � � � *� *� *� *� *� �?�?�?� ��?� �8�8�8� ��8� � � � � r3rr�r$c�0��d�fd� }t|���S)zMDecorate a method memoize its return value. :meta private: rNrr+r�r+c�����|g|�Ri|����fd�}�j|_�j|_||j�j<|xj�jhzc_�S)Nc����Sr.rbr�s �r2r�zBHasMemoized.memoized_instancemethod.<locals>.oneshot.<locals>.memo�s���� r3)r]r`r8rr�s @�r2r�z4HasMemoized.memoized_instancemethod.<locals>.oneshot�s{�����R��*�t�*�*�*�r�*�*�F� � � � � ��K�D�M��:�D�L�)-�D�M�"�+� &� � � �B�K�=� 0� � ��Mr3)rNrr+rr�rr+rr)rcr�r�s ` r2r�z#HasMemoized.memoized_instancemethod�s3��� � � � � � ��g�r�*�*�*r3Nr\)r�r>rRrr+rI�r�r$r+r$)r]r^r_r`rra� frozensetrr5rrr �memoized_propertyr!rr�r�rbr3r2rr�s���������� ��� �%.�Y�[�[�N�0�0�0�0�*�*�*�*�-�-�-�-�%�%�%�%������.�r�2����:�+�+�+��[�+�+�+r3rc�$�eZdZdZdZd�Zd d�Zd 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__. rbc� �t|���r.)r )rNr�s r2�_fallback_getattrzMemoizedSlots._fallback_getattrs���S�!�!�!r3r�r>r+rc�������d��s��d��rt����t�jd�����r.t �d�������}t ��|��|St�jd�����r(t �d���������fd�}�j|_|S�����S)N�_memoized_attr_�_memoized_method_c�v����|i|����fd�}�j|_�j|_t��|���S)Nc����Sr.rbr�s �r2r�z8MemoizedSlots.__getattr__.<locals>.oneshot.<locals>.memo)s���!�Mr3)r]r`r�)r+r�r�r�r�r�rNs @���r2r�z*MemoizedSlots.__getattr__.<locals>.oneshot&sY������T��R����"�"�"�"�"�!#� �� �!�z�� ���c�4�(�(�(�� r3)r�r r�r�r:r�r`r)rNr�rRr�r�s`` @r2� __getattr__zMemoizedSlots.__getattr__s����� �>�>�+� ,� ,� /���� �1 �1 � /�!��%�%� %��T�^�%<�s�%<�%<� =� =� /�:�G�D�"9�C�"9�"9�:�:�<�<�E� �D�#�u� %� %� %��L� �T�^�%>��%>�%>� ?� ?� /���8�3�8�8�9�9�B� � � � � � � �!�j�G�O��N��)�)�#�.�.� .r3N)r�r>r+r)r]r^r_r`rarr!rbr3r2rr sH���������I�"�"�"�/�/�/�/�/�/r3rc���t|t��rD|������}|dvrdS|dvrdSt d|z���t |��S)N)�true�yes�on�y�t�1T)�false�no�offr{�f�0FzString is not true/false: %r)r6r>�stripry� ValueErrorr�r1s r2�asboolr08sp���#�s���C��i�i�k�k���!�!�� �6� 6� 6��4� �9� 9� 9��5��;�c�A�B�B� B� ��9�9�r3�text�!Callable[[str], Union[str, bool]]c���d�fd� }|S)zqReturn a callable that will evaluate a string as boolean, or one of a set of "alternate" string values. r*r>r+�Union[str, bool]c�.��|�vr|St|��Sr.)r0)r*r1s �r2� bool_or_valuez"bool_or_str.<locals>.bool_or_valueJs��� �$�;�;��J��#�;�;� r3)r*r>r+r4rb)r1r6s` r2� bool_or_strr7Ds)��� ������ �r3rR� Optional[int]c�(�|�|St|��S)zCoerce to integer.)r�)rRs r2�asintr:Ss�� �}�� � �u�:�:�r3r�r�rP� flexi_bool�dest�Optional[Dict[str, Any]]rIc���|�|}||vrnt|t��rt|||��sG||�=|tur|rt||��||<dS|||��||<dSdSdSdS)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)r6r7r�r0)r�r�rPr;r<s r2�coerce_kw_typer?[s��� �|��� �r� � ��E�4�(�(� �0:�2�c�7�E�0J�0J� � �s�G� � �D�=�=�Z�=��r�#�w���D��I�I�I���b��g���D��I�I�I� � � � � � r3c�`��t|��}|ft�fd�|D����zS)zbProduce a tuple structure that is cacheable using the __dict__ of obj to retrieve values c3�H�K�|]}|�jv� |�j|fV��dSr.�r8�rz�kr*s �r2r|z"constructor_key.<locals>.<genexpr>{sC�������!"�q�C�L�/@�/@��C�L��O��/@�/@�/@�/@��r3)rr�)r*rcr�s` r2�constructor_keyrEusS��� �3� � �E� �6�E�����&+������ �r3r+c���t|��}|��fd�|�|��D����||i|��S)z�Instantiate cls using the __dict__ of obj as constructor arguments. Uses inspect to match the named arguments of ``cls``. c3�H�K�|]}|�jv� |�j|fV��dSr.rBrCs �r2r|z#constructor_copy.<locals>.<genexpr>�sC�������!"�a�3�<�>O�>O��C�L��O��>O�>O�>O�>O��r3)rrB� difference)r*rcr+r�r�s` r2�constructor_copyrI�ss��� �3� � �E��I�I�����&+�&6�&6�r�&:�&:������� �3�� �� � �r3�Callable[[], int]c�d���tj���tjd�����fd�}|S)z%Return a threadsafe counter function.rc�Z���5t���cddd��S#1swxYwYdSr.)�next)�counter�locks��r2�_nextzcounter.<locals>._next�sv��� � !� !���=�=� !� !� !� !� !� !� !� !� !� !� !� !���� !� !� !� !� !� !s � �$�$)� threading�Lockr��count)rPrNrOs @@r2rNrN�sG���� �>� � �D��o�a� � �G�!�!�!�!�!�!� �Lr3�specimenrk�Optional[Type[Any]]c���t|d��r/|j�!t|jt��rtS|jSt |t ��rtnt}||t ��rt S||t��rtS||t��rtSt|d��rt St|d��rtSt|d��rtS|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__Nr�rirg)r�rWr�rgr6r7r�r�)rTrk�isas r2�duck_type_collectionrY�s����x��(�(�)� � � ,�� � !�3�2 �2 � ,��J��(� (�"�8�T�2�2� B�*�*� �C� �s�8�T����� � ��X�s� � ��� � ��X�t� � ��� ��x��"�"��� � ��5� !� !��� � ��5� !� !��� ��r3r��argtype�'Union[Tuple[Type[Any], ...], Type[Any]]r�c �6�t||��r|St|t��rHtjd|�dd�d�|D�����dt |���d����tjd|�d|�dt |���d����) Nz Argument 'z ' is expected to be one of type z or c3� K�|] }d|zV�� dS)z'%s'Nrb)rzr�s r2r|z"assert_arg_type.<locals>.<genexpr>�s&����$A�$A�A�V�a�Z�$A�$A�$A�$A�$A�$Ar3z, got '�'z' is expected to be of type 'z', got ')r6r�r � ArgumentErrorr}r7)r�rZr�s r2�assert_arg_typer`�s����#�w��� �� � �g�u� %� %� ��#�#��4�4����$A�$A��$A�$A�$A�A�A�A�A�4��9�9�9�9�N��� � �#�#��4�4����$�s�)�)�)�)�-��� r3c ����t�d��r!t������St�dt�dd�������t d�z���t�d��r��fd�}|��St�d��r-t �fd �����D����St d�z���) z?Return a (key, value) iterator for almost any dict-like object.rw� __getitem__r9NzObject '%r' is not dict-like�iterkeysc3�`�K�����D]}��J�|�|��fV��dSr.)rc)r��dictlike�getters ��r2�iteratorz$dictlike_iteritems.<locals>.iterator�sT������(�(�*�*� '� '���)�)�)��6�6�#�;�;�&�&�&�&�&� '� 'r3r�c3�2�K�|]}|�|��fV��dSr.rb)rzr�rfs �r2r|z%dictlike_iteritems.<locals>.<genexpr>�s0�����B�B�3�S�&�&��+�+�&�B�B�B�B�B�Br3)r�r�rwr:r�iterr�)rergrfs` @r2r�r��s������x��!�!�&��H�N�N�$�$�%�%�%� �X�}�g�h��t�.L�.L� M� M�F� �~��6��A�B�B�B��x��$�$� C� '� '� '� '� '� '� �x�z�z�� ��6� "� "�C��B�B�B�B�(�-�-�/�/�B�B�B�B�B�B��6��A�B�B�Br3c�:��eZdZUdZded<d�fd� Zddd �Z�xZS)� classpropertyaAA 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. �Callable[[Any], Any]r�r�rr�c�Z��t��j|g|�Ri|��|j|_dSr.)�superr�r`)rNr�r�r�r�s �r2r�zclassproperty.__init__�s7���������*��*�*�*�r�*�*�*��|�� � � r3Nr*rc�Optional[type]r+c�,�|�|��Sr.r�r�s r2r�zclassproperty.__get__�s���y�y��~�~�r3)r�rlr�rr�rr.)r*rrcror+r)r]r^r_r`r5r�r�� __classcell__�r�s@r2rkrk�sp��������������$�$�$�$�$�$���������r3rkc�&�eZdZdd�Zdd �Zdd �Zd S)�hybridpropertyr!r c�"�||_||_dSr.)r!�clslevel�rNr!s r2r�zhybridproperty.__init__�s���� ��� � � r3r�r�ownerr+r!c�^�|�|�|��}|S|�|��Sr.�rvr!�rNr�rx�clsvals r2r�zhybridproperty.__get__�0�� � ��]�]�5�)�)�F��M��9�9�X�&�&� &r3r��hybridproperty[_T]c��||_|Sr.�rvrws r2� classlevelzhybridproperty.classlevel ����� �� r3N�r!r �r�rrxrr+r!)r!r�r+r~)r]r^r_r�r�r�rbr3r2rtrt�sP����������'�'�'�'������r3rtc�6�eZdZdd�Zdd �Zdd �Zdd�Zdd�ZdS)�rw_hybridpropertyr!r c�0�||_||_d|_dSr.)r!rv�setfnrws r2r�zrw_hybridproperty.__init__s���� ��� �37�� � � r3r�rrxr+r!c�^�|�|�|��}|S|�|��Sr.rzr{s r2r�zrw_hybridproperty.__get__r}r3rRrIc�D�|j�J�|�||��dSr.�r�r�s r2r�zrw_hybridproperty.__set__s*���z�%�%�%� � � �8�U�#�#�#�#�#r3r��rw_hybridproperty[_T]c��||_|Sr.r�rws r2�setterzrw_hybridproperty.setter s���� �� r3c��||_|Sr.r�rws r2r�zrw_hybridproperty.classlevel$r�r3Nr�r�r�)r!r�r+r�)r]r^r_r�r�r�r�r�rbr3r2r�r�sx������8�8�8�8� '�'�'�'�$�$�$�$����������r3r�c�*�eZdZdZdd�Zdd �Zdd �Zd S)� hybridmethodz/Decorate a function as cls- or instance- level.r!r c�0�|x|_|_||_dSr.)r!r�rvrws r2r�zhybridmethod.__init__,s��$(�(�� �D�M��� � � r3r�rrxr+c�|�|� |j�||j��S|j�||��Sr.)rvr�r�r!)rNr�rxs r2r�zhybridmethod.__get__0s:�� � ��=�(�(����@�@� @��9�$�$�X�u�5�5� 5r3r��hybridmethod[_T]c��||_|Sr.r�rws r2r�zhybridmethod.classlevel6r�r3Nr�)r�rrxrr+r )r!r�r+r�)r]r^r_r`r�r�r�rbr3r2r�r�)sV������9�9�����6�6�6�6� �����r3r�c�j�eZdZUdZded<iZded<ej��Z ddd �Z d �Z d�Z d�Z dS)�symbolaIA 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>r�zDict[str, symbol]�symbolsNr�ru� canonicalr8r+c��|j5|j�|��}|�ct|t��sJ�|�t |��}t �t|��}||_ |r||_ ||j|<n|r||krtd|�d|�����|cddd��S#1swxYwYdS)Nz#Can't replace canonical symbol for z with new int value ) �_lockr�r9r6r>�hashr��__new__r�r�r`r)rcr�r�r�r�s r2r�zsymbol.__new__Os0�� �Y� � ��+�/�/�$�'�'�C��{�!�$��,�,�,�,�,��$� $�T� � �I��k�k�&�)�4�4������&�"%�C�K� %(�� �D�!�!����c�!1�!1�#�:�d�:�:�.7�:�:�����- � � � � � � � � � � � ���� � � � � � s�BB3�3B7�:B7c�>�t|jdt|��ffS)Nr=)r�r�r�rMs r2� __reduce__zsymbol.__reduce__ms���� �3��D� � �2�2�2r3c� �t|��Sr.rnrMs r2�__str__zsymbol.__str__ps���D�z�z�r3c��d|j�d�S)Nzsymbol(rr�r�rMs r2�__repr__zsymbol.__repr__ss��'���'�'�'�'r3)NN)r�r>r�rur�r8r+r�) r]r^r_r`r5r�rQrRr�r�r�r�r�rbr3r2r�r�;s�������� � ��I�I�I�!#�G�#�#�#�#� �I�N� � �E� "�#'� �����<3�3�3����(�(�(�(�(r3r�c��eZdZdd �Zdd �ZdS)� _IntFlagMeta� classnamer>r��Tuple[Type[Any], ...]�dict_r�r�rr+rIc ��gx|_}|���D]�\}}tjd|��r�t |t ��rt ||���}n%|�d��std����gt|||��|� |����tj d�|D����|_ dS)Nz^__.*__$)r�r�z#Expected integer values for IntFlagc��i|] }|j|�� Srbr�)rzr�s r2� <dictcomp>z)_IntFlagMeta.__init__.<locals>.<dictcomp>�s�� ,� ,� ,�s�S�X�s� ,� ,� ,r3)�_itemsrwr~�matchr6r�r�r�rr�r�r� immutabledict� __members__) rcr�r�r�r�rwrD�vr�s r2r�z_IntFlagMeta.__init__xs��� ��� �U��K�K�M�M� � �D�A�q��x� �Q�'�'� ���!�S�!�!� ��Q�!�,�,�,����\�\�#�&�&� �� E�F�F�F�� �C��C� � � � �L�L�� � � � �&�4� ,� ,�e� ,� ,� ,� � ����r3�Iterator[symbol]c� �td���)Nz�iter not implemented to ensure compatibility with Python 3.11 IntFlag. Please use __members__. See https://github.com/python/cpython/issues/99304r�rMs r2�__iter__z_IntFlagMeta.__iter__�s��!� =� � � r3N) r�r>r�r�r�r�r�rr+rI)r+r�)r]r^r_r�r�rbr3r2r�r�ws<������ � � � �2 � � � � � r3r�c��eZdZdZdS)� _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. Nr�rbr3r2r�r��s���������r3r�)� metaclass)�IntFlag�_E�choices�Dict[_E, List[Any]]�resolve_symbol_names� Optional[_E]c��|���D]&\}}||ur|cS|r||jkr|cS||vr|cS�'|�dStjd|�d|�����)aOGiven 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. NzInvalid value for 'z': )rwr�r r_)r�r�r�r�� enum_value�choices r2�parse_user_argument_for_enumr��s���(&�m�m�o�o���� �F� �*� � �� � � � !� �c�Z�_�&<�&<�� � � � �F�]�]�� � � �� �{��t� � �B�$�B�B�3�B�B� C� C�Cr3r�c�2�t|_tdz adS)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). rN)�_creation_order)r�s r2�set_creation_orderr��s�� /�H���q��O�O�Or3r[c�� ||i|��S#t$r/tdtj��dd�z��YdSwxYw)zXexecutes the given function, catches all exceptions and converts to a warning. z%s('%s') ignoredrrN)rq�warnrKrL)r!r+r[s r2�warn_exceptionr��sc�� 7��t�T�$�V�$�$�$�� �7�7�7� � �#�,�.�.��1��"5� 5�6�6�6�6�6�6�7���s� �5A�A�c�l� t|��|kr d|d|�zS|S#t$r|cYSwxYw)Nz%s...r)rFr)rR�len_s r2�ellipses_stringr��sT��� �u�:�:�� � ��U�1�T�6�]�*� *��L�� ����� � � ����s�$�$� 3�3c�@��eZdZUdZded<d�fd � Zdd �Zdd�Z�xZS)�_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��_hashrRr>�numr+� Sequence[Any]r+c���||zd|zz}t���||��}td|t|��|zfz��|_|S)Nz6 (this warning may be suppressed after %d occurrences)z%s_%d)rnr�r�r�)rcrRr�r+� interpolatedrNr�s �r2r�z_hash_limit_string.__new__s_����� � D�s� J� � ��w�w���s�L�1�1���'�U�D��,>�,>��,D�$E�E�F�F�� �� r3c��|jSr.)r�rMs r2�__hash__z_hash_limit_string.__hash__ s ���z�r3�otherrr�c�B�t|��t|��kSr.)r�)rNr�s r2�__eq__z_hash_limit_string.__eq__s���D�z�z�T�%�[�[�(�(r3)rRr>r�r�r+r�r+r�)r+r�)r�rr+r�) r]r^r_r`r5r�r�r�rqrrs@r2r�r��s|�����������J�J�J�����������)�)�)�)�)�)�)�)r3r��msgc��|r%ttj||�����dSt|tj��dS)zdIssue a warning. If msg is a string, :class:`.exc.SAWarning` is used as the category. )r�N)�_warnings_warnr � SAWarning)r�r�s r2r�r�sG�� �+��s�}�S�t�4�4�4�5�5�5�5�5��s�C�M�*�*�*�*�*r3r�c�`�|rt|d|��}t|tj��dS)z\Issue a warning with a parameterized string, limiting the number of registrations. � N)r�r�r r�)r�r+s r2� warn_limitedr� s5��  �0� ��b�$�/�/���3�� �&�&�&�&�&r3z)Dict[CodeType, Tuple[str, Type[Warning]]]� _warning_tags�message�category� Type[Warning]�Callable[[_F], _F]c������fd�}|S)Nc�*����ft|j<|Sr.)r�r)r�r�r�s ��r2�goz#tag_method_for_warnings.<locals>.go0s���&-�x�%8� �b�k�"�� r3rb)r�r�r�s`` r2�tag_method_for_warningsr�-s)���������� �Ir3z&^(?:sqlalchemy\.(?!testing)|alembic\.)�Union[str, Warning]�Optional[Type[Warning]]� stacklevelc��� tj|��}dx}}|�~|s5tjt|j�dd����sd}|jtvr#d}t|j\}}|p|}|�d|�d�}|j }|s|dz }n|r|rn|�~n#t$rd}Ynd}YnxYw|�tj |||dz� ��dStj ||dz� ��dS) NFr]r�Tz (rrrr)r�) rK� _getframer~r��_not_sa_pattern� f_globalsr9�f_coder��f_backr/�warningsr�)r�r�r��frame�stacklevel_found�warning_tag_found�_suffix� _categorys r2r�r�:s]�� %�� �j�)�)��05�4��,���$� (�B�H����!4�!4�Z��!D�!D�-�-� (� $(� � �|�}�,�,�$(�!�'4�U�\�'B�$��)�#�0�y��$�2�2��2�2�2���L�E�#� ��a�� � �!� �&7� ��3���� ����� � � ��� � � ����<��� �g�x�J��N�C�C�C�C�C�C�� �g�*�q�.�9�9�9�9�9�9s�B� B.�)B.r �retry_on_exception�Callable[..., Optional[_T]]c�"�����g�d���fd� }|S)zNDecorate the given function to be a no-op after it is called exactly once.r�rr�r+� Optional[_T]c����}�r;����} ||i|��S#�r��d|���xYwdS)Nr)rh�insert)r�r�� strong_fn�once_fnr��oncer�s ���r2r�zonly_once.<locals>.gousf���� � � ��h�h�j�j�G� ��w��*�r�*�*�*�� �%�,��K�K��7�+�+�+������ts�#�>)r�rr�rr+r�rb)r�r�r�r�s`` @r2� only_oncerms=����� �4�D� � � � � � � � � �Ir3z%sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.pyzunit(?:2|test2?/)�tb�exclude_prefix�re.Pattern[str]�exclude_suffixc�`�d}t|��dz }||krA|�||��r&|dz }||kr|�||���&||krA|�||��r&|dz}||kr|�||���&|||dz�S)atChop 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`` rr)rF�search)rrrr��ends r2�chop_tracebackr�s���" �E� �b�'�'�A�+�C� �3�,�,�>�0�0��E��;�;�,� �� �� �3�,�,�>�0�0��E��;�;�,� �3�,�,�>�0�0��C��9�9�,� �q��� �3�,�,�>�0�0��C��9�9�,� �e�c�A�g�o� �r3c�|�d|z}t�����}t||��|dS)Nz&def set(obj, value): obj.%s = valuerg)r��copyr�)�attrnamer�r�s r2� attrsetterr �s4�� 3�h� >�D� �(�(�-�-�/�/�C���s�O�O�O� �u�:�r3z^__.+__$c�(��eZdZdZdZd�fd� Z�xZS)� TypingOnlyz�A mixin class that marks a class as 'typing only', meaning it has absolutely no methods, attributes, or runtime functionality whatsoever. rbr+rIc���t|jvr)d�|jD��}|rtd|�d|�d����t �����dS)Nc�F�h|]}t�|���|��Srb)�_dundersr��rzr�s r2� <setcomp>z/TypingOnly.__init_subclass__.<locals>.<setcomp>�s9������X�^�^�D�5I�5I�����r3zClass z< directly inherits TypingOnly but has additional attributes r�)rrr8�AssertionErrorrn�__init_subclass__)rc� remainingr�s �r2rzTypingOnly.__init_subclass__�s���� ��� &� &���!$�����I�� �$�:�S�:�:�-6�:�:�:���� ���!�!�#�#�#�#�#r3r\)r]r^r_r`rarrqrrs@r2rr�sN��������� �I� $� $� $� $� $� $� $� $� $� $r3rc�J��eZdZUdZded< d �fd� Zed d ���Z�xZS) � EnsureKWArga6Apply 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_kwargr+rIc�2��|j}|j}|re|D]b}tj||��}|rI||}t j|��}|js&|�|��}t|||���ct��� ��dSr.) rr8r~r�rr�r-� _wrap_w_kwr�rnr) rc�fn_reg�clsdictr�rDr�r��wrappedr�s �r2rzEnsureKWArg.__init_subclass__�s�����!���,�� � 3�� 3� 3���H�V�S�)�)���3� ���B�!�8��<�<�D��:�3�"%�.�.��"4�"4����S�'�2�2�2�� ���!�!�#�#�#�#�#r3r�r�c�0��d�fd� }t|���S)Nr�rr�r+c����|�Sr.rb)r�r�r�s �r2�wrapz$EnsureKWArg._wrap_w_kw.<locals>.wrap�s����2�s�8�Or3)r�rr�rr+rr)rcr�r!s ` r2rzEnsureKWArg._wrap_w_kw�s3��� � � � � � ��d�B�'�'�'r3r\)r�r�r+r�) r]r^r_r`r5rr�rrqrrs@r2rr�s|��������������� $� $� $� $� $� $��(�(�(��[�(�(�(�(�(r3rc�0�t|d��rt||��S|}|jj|_t|d��r |j|_t|jd��r|jjr|jj|_n|jr |j|_|S)z�Augment functools.update_wrapper() to work with objects with a ``__call__()`` method. :param fn: object with __call__ method r]r^r`)r�rr�r]r^r)r`)�wrapperr��_fs r2� wrap_callabler%�s����r�:��� ��g�r�*�*�*� ���l�+�� � �2�|� $� $� *��M�B�M� �2�;� � *� *� $�r�{�/B� $���,�B�J�J� �Z� $���B�J�� r3c��d|vr|�d��Sd}gg}d}t|��}||kr�||}|dkrE|dkr9||dz kr0||dzdkr!|d�d��|dz }nC|dz}n=|dkr|dkr|�g��n|d�|��|dz }||k��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�rrrCc�8�g|]}d�|����S)r�)r})rzrs r2riz'quoted_token_parser.<locals>.<listcomp>1s"�� /� /� /�u�B�G�G�E�N�N� /� /� /r3)rrFr�)rRr�r��idx�lv�chars r2�quoted_token_parserr,s��$ �%����{�{�3���� �E�!�d�F� �C� �U���B� ��(�(��S�z�� �3�;�;���z�z�c�B��F�l�l�u�S�1�W�~��/D�/D��r� �!�!�#�&�&�&��q������ ��� �S�[�[�U�a�Z�Z� �M�M�"� � � � � �2�J� � �d� #� #� #� �q��� ��(�(� 0� /�� /� /� /�/r3�paramsc�>���tj������fd�}|S)Nc�v��|jdur|jpd}|rt|�fd��D����}||_|S)Nr�c���i|]}|���Srbrb)rz�paramr1s �r2r�z8add_parameter_text.<locals>.decorate.<locals>.<dictcomp>:s���)J�)J�)J�%�%��)J�)J�)Jr3)r`�inject_param_text)r�r�r-r1s ��r2r�z$add_parameter_text.<locals>.decorate7sT����j��$�3���9�r�� � L�#�C�)J�)J�)J�)J�6�)J�)J�)J�K�K�C��� �� r3)rrs)r-r1r�s`` r2�add_parameter_textr34s9���� � !�&� )� )�F������� �Or3c���|�dd��}t|��dkr|S|\}}|�d��s|dztj|��zStj|��S)N� rrw)rrFr��textwrap�dedent)r1� split_text� firstliners r2�_dedent_docstringr:Asu�����D�!�$�$�J� �:���!���� �)�� �9� � � �� $� $�%��4��(�/�)�"<�"<�<�<���t�$�$�$r3� given_doctext� injecttext�posc�,�t|pd��}|�d��}t|��dkr|�d��t j|���d��}|dr|�dd��d�t|��D��}|�dd��|t|t|��dz ��}|d|�|z||d�z}d� |��S)Nr�r5rrc�@�g|]\}}|����|��Srb)r.)rzr��lines r2riz)inject_docstring_text.<locals>.<listcomp>Xs)�� H� H� H�i�c�4�4�:�:�<�<� H�c� H� H� Hr3) r:rrFr�r6r7r�ru�minr})r;r<r=�doctext�lines� injectlines�blanks� inject_poss r2�inject_docstring_textrGMs��%�]�%8�b�9�9�G� �M�M�$� � �E� �5�z�z�Q��� � � �R�����/�*�-�-�3�3�D�9�9�K��1�~�"����1�b�!�!�!� H� H�9�U�#3�#3� H� H� H�F� �M�M�!�Q������C��V���q��1�1�2�J� �!�J�,� �+� -��j�k�k�0B� B�E� �9�9�U� � �r3z(\s+):param (.+?):rB� inject_params�Dict[str, str]c�z�tj|�����}g}d}|�rz|���}t�|��}|��|r�|�d���d��}||vrwdt|�d����zdz}|rBtjd|d��} | r%dt| �d����z}|||z}n�|r|� d|dg��d}no|� ��s|� ||dg��d}n@|� d��r+|� ||���g����e|� |��|��zd�|��S) Nr�*rwrz(\s+)\Srr5z::)� collections�deque� splitlines�popleft� _param_regr�r��lstriprFr~rj�rstripr�r�r}) rBrH�doclinesrC� to_injectr@rDr1�indent�m2s r2r2r2ds���� ��!3�!3�!5�!5�6�6�H� �E��I� �����!�!�� � � �T� "� "�� � �� >����� � �)�)�#�.�.���M�)�)� �3�q�w�w�q�z�z�?�?�2�S�8�F� �<��X�j�(�1�+�>�>���<�%(�3�r�x�x��{�{�+;�+;�%;�F� &��u�)=� =�I�� � � �L�L�$� �4�0� 1� 1� 1��I�I������ � �L�L�$� �4�0� 1� 1� 1��I�I� �]�]�4� � � � �L�L�$�� 0� 0� 2� 2�3� 4� 4� 4� � � � �T����? ��B �9�9�U� � �r3r�c�*�t|��dkrdSt|��dk}|r |dd�n|dd�|dd�z}d�|D��}|rd�|��Sd�|dd����d|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 truncatedrNr6r�rCc�R�g|]$}t|��dkr d|dd�zn|��%S)� z%s..N)rFrs r2riz$repr_tuple_names.<locals>.<listcomp>�s8�� L� L� L�d��T���R���6�D��"��I� � �T� L� L� Lr3rqz, ..., )rFr})r��flag�ress r2�repr_tuple_namesr\�s��� �5�z�z�Q����t� �u�:�:��?�D�� ;�E�!�A�#�J�J�E�!�A�#�J��r�s�s��$;�E� L� L�e� L� L� L�C� �>��y�y��~�~�� $� � �#�a��c�(� 3� 3� 3� 3�S��W�W�=�=r3c�:�trdS|rtd���dS)NTzDcython extensions were expected to be installed, but are not presentF)r� ImportError)�raise_s r2�has_compiled_extr`�s5�����t� ��� "� � � � �ur3c�,�eZdZej��ZdS)�_MissingN)r]r^r_�enum�auto�Missingrbr3r2rbrb�s�������d�i�k�k�G�G�Gr3rb)r*rr+r,)r=rr+r>)rcrdr+re)rorr+r>r.)rcrsrtrur+r>)r�r�r�r�r+r�)r�r�r+r�)r�r�r�r>r+r�)r�r�r{r�r+r�)r�r�r+r�)r�r�r�r�r�r>r+r�)rcr7rrrrr+r)rcr7rrrr�r+r)r!r�r+r")FF)r�r�r%r�r&r�r+r')T)r�r3r�r�r+r4)rbrbrbrb)rOrsrPr>rQr>rRr�rSr�rTr�rUr�r+rV)rbNrb) r*rrarbrcrdrer�r+r>)NNr�N)NNNr)r*rr+r�)r1r>r+r2)rRrr+r8)TN) r�r�r�r>rPrsr;r�r<r=r+rI)r*rrcrsr+r�) r*r!rcrdr+rr�rr+r!)r+rJ)rTrrkrUr+rU)r�rrZr[r�r>r+r)F) r�rr�r�r�r>r�r�r+r�r�)r!r�r+rr[rr+r)r�)r�r>r�rur+rI)r�r>r+r�r+rI)r�r>r�r�r+r�)Nr)r�r�r�r�r�r�r+rI)r�r r�r�r+r�)rr"rrrrr+r")r-rr1r>r+r�)r1r>r+r>)r;rur<r>r=r�r+r>)rBr>rHrIr+r>)r�r"r+ru)�r`� __future__rrLrc� functoolsrr/r�r�r~rKr6rQr�r�typingrrr r r r r rrrrrrrrrrrrr�r�rr�_has_cyrrr r!r"r$r&r'r(r)�py310r0rErGrnrrr�r�r�r�r�r�r�r�r�r�r�r�rrr$r2r�rNrYr\r`rr�r�r�r�r�r�r�r�r�r�r�non_memoized_property�property�ro_memoized_property�ro_non_memoized_propertyr�r�!HasMemoized_ro_memoized_attributerrr0r7r:r?rErIrNrYr`r�rkrtr�r�r�r�r7r�r�r�� FastIntFlag�Enumr�r�r�r�r�r�r>r�r�r�r�r5r��compiler�r�r�_SQLA_RE� _UNITTEST_REr�NoneTyper rrrr%r,r3r:rGrPr2r\r`rbre� MissingOrrbr3r2�<module>rwsy �����#�"�"�"�"�"����� � � � �$�$�$�$�$�$������������� � � � � � � � ��������� � � � ������������������������������������������������������������������������������������������������������� � � � � � �����������������������������$�$�$�$�$�$������������� �W�T�]�]�����4�(�(�(�� �W�T��#�s�(�+�,�,�,�� �g�e�3�4�4�4�� �g�e�@�A�A�A�� �g�e�0�1�1�1�� �g�e�.�/�/�/�� �<�2�,�,�,�,�,� 2�2�2�2�"$�$�$�$�82�82�82�82�82�82�82�82�v � � � �6�6�6�6�/3�O�O�O�O�O�,�,�,�,�$ � � � � M� M� M� M� �����g�e�/�0�0�0�� D,�D,�D,�D,�N���*�����g�e�n�n�� �g�e�n�n��% �% �% �% �% �% �% �% �P � � �( � $�!� ����� ��� �-1�E������ ��� .2�E�2�2�2�2�2�2�j2�2�2�2�EJ�5;�5;�5;�5;�5;�rHL�r �r �r �r �r �j����J#%�� "�/1������26�6�6�( � � �02�8<� "� KB�KB�KB�KB�KB�\;�;�;�;�;�;�;�;�<#�#�#�L � � �& � � �� @/�@/�@/�@/�F���S�S�S�S�l�w�v�9�:�:�:��($�($�($�($�($�G�E�N�($�($�($�V"�"�"�"�"�2�5�9�"�"�"�"%�%�%�%�%�.�u�5�%�%�%�<�N�.��1�� $��'���0B�A��,�7M�M��4�'�'�'�'�.J+�J+�J+�J+�J+�J+�J+�J+�Z�G�(0�%�%�(3�(F�%�*/�*/�*/�*/�*/�*/�*/�*/�\ � � � � � � � ������%)� '�'�'�'�'�4���� � � � � � � � �37� � � � � �F����$C�C�C�0�����H����*�����W�R�[����"������� ����4�����7�2�;����$9(�9(�9(�9(�9(�S�9(�9(�9(�x � � � � �4� � � �D�����\��������������K�K��K� �W�T���#�#�#��"'� D�D�D�D�D�D�� � � � �7�7�7�7�����)�)�)�)�)��)�)�)�< +� +� +� +� +�'�'�'�'�<>� �=�=�=�=������"�*�F�G�G�� )-��0:�0:�0:�0:�0:�f����4 �2�:�>� ?� ?���r�z�.�/�/� � '3�&.������4 �4��:�:����� �2�:�j� !� !��$�$�$�$�$�$�$�$�*&(�&(�&(�&(�&(�&(�&(�&(�R���0)0�)0�)0�X � � � � %� %� %� %�����(�R�Z�-� .� .� �(�(�(�(�V >� >� >� >� � � � ������t�y���� � �� �"�g�h�.�/�/� 0� � � r3
Memory