� g\�g]y��^�dZddlmZddlmZddlZddlmZddlm Z ddlm Z ddlm Z ddlm Z dd lm Z dd lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!Gd�de��Z"d%d!�Z#d&d$�Z$dS)'aProvides the :class:`~sqlalchemy.engine.url.URL` class which encapsulates information about a database connection specification. The URL object is created automatically when :func:`~sqlalchemy.engine.create_engine` is called with a string argument; alternatively, the URL is a public-facing construct which can be used directly and is also accepted directly by ``create_engine()``. �)� annotationsN)�Any)�cast)�Dict)�Iterable)�List)�Mapping)� NamedTuple)�Optional)�overload)�Sequence)�Tuple)�Type)�Union)� parse_qsl)�quote)� quote_plus)�unquote�)�Dialect�)�exc)�util)�plugins)�registryc��eZdZUdZded< ded< ded< ded< ded < ded < d ed < ed d d d d ejfdJd���ZedKd���Z edLd���Z edMd���Z edNd���Z dOdPd�Z dQd�Z dRdSd"�Z dRdTd%�Z dRdUd(�ZdVd+�ZedWd-���Zejd.d/��dXdYd2���ZdXdYd3�ZdZd4�Zd[d5�Zd\d7�Zd]d9�Zd^d;�Zd^d<�ZdZd=�ZdZd>�Zd_dB�Z d`dD�Z!dRdadF�Z" dbdcdI�Z#d S)d�URLa� Represent the components of a URL used to connect to a database. URLs are typically constructed from a fully formatted URL string, where the :func:`.make_url` function is used internally by the :func:`_sa.create_engine` function in order to parse the URL string into its individual components, which are then used to construct a new :class:`.URL` object. When parsing from a formatted URL string, the parsing format generally follows `RFC-1738 <https://www.ietf.org/rfc/rfc1738.txt>`_, with some exceptions. A :class:`_engine.URL` object may also be produced directly, either by using the :func:`.make_url` function with a fully formed URL string, or by using the :meth:`_engine.URL.create` constructor in order to construct a :class:`_engine.URL` programmatically given individual fields. The resulting :class:`.URL` object may be passed directly to :func:`_sa.create_engine` in place of a string argument, which will bypass the usage of :func:`.make_url` within the engine's creation process. .. versionchanged:: 1.4 The :class:`_engine.URL` object is now an immutable object. To create a URL, use the :func:`_engine.make_url` or :meth:`_engine.URL.create` function / method. To modify a :class:`_engine.URL`, use methods like :meth:`_engine.URL.set` and :meth:`_engine.URL.update_query_dict` to return a new :class:`_engine.URL` object with modifications. See notes for this change at :ref:`change_5526`. .. seealso:: :ref:`database_urls` :class:`_engine.URL` contains the following attributes: * :attr:`_engine.URL.drivername`: database backend and driver name, such as ``postgresql+psycopg2`` * :attr:`_engine.URL.username`: username string * :attr:`_engine.URL.password`: password string * :attr:`_engine.URL.host`: string hostname * :attr:`_engine.URL.port`: integer port number * :attr:`_engine.URL.database`: string database name * :attr:`_engine.URL.query`: an immutable mapping representing the query string. contains strings for keys and either strings or tuples of strings for values. �str� drivername� Optional[str]�username�password�host� Optional[int]�port�database�4util.immutabledict[str, Union[Tuple[str, ...], str]]�queryN�'Mapping[str, Union[Sequence[str], str]]�returnc ��||�|d��|�|d��||�|d��|�|��|�|d��|�|����S)a�Create a new :class:`_engine.URL` object. .. seealso:: :ref:`database_urls` :param drivername: the name of the database backend. This name will correspond to a module in sqlalchemy/databases or a third party plug-in. :param username: The user name. :param password: database password. Is typically a string, but may also be an object that can be stringified with ``str()``. .. note:: The password string should **not** be URL encoded when passed as an argument to :meth:`_engine.URL.create`; the string should contain the password characters exactly as they would be typed. .. note:: A password-producing object will be stringified only **once** per :class:`_engine.Engine` object. For dynamic password generation per connect, see :ref:`engines_dynamic_tokens`. :param host: The name of the host. :param port: The port number. :param database: The database name. :param query: A dictionary of string keys to string values to be passed to the dialect and/or the DBAPI upon connect. To specify non-string parameters to a Python DBAPI directly, use the :paramref:`_sa.create_engine.connect_args` parameter to :func:`_sa.create_engine`. See also :attr:`_engine.URL.normalized_query` for a dictionary that is consistently string->list of string. :return: new :class:`_engine.URL` object. .. versionadded:: 1.4 The :class:`_engine.URL` object is now an **immutable named tuple**. In addition, the ``query`` dictionary is also immutable. To create a URL, use the :func:`_engine.url.make_url` or :meth:`_engine.URL.create` function/ method. To modify a :class:`_engine.URL`, use the :meth:`_engine.URL.set` and :meth:`_engine.URL.update_query` methods. rr!r#r&)� _assert_str�_assert_none_str� _assert_port� _str_dict)�clsrr!r"r#r%r&r(s �e/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sqlalchemy/engine/url.py�createz URL.create�s���p�s� �O�O�J� � 5� 5� � � ��:� 6� 6� � � � ��v� .� .� � � �T� "� "� � � ��:� 6� 6� �M�M�%� � � � � �c�d�|�dS t|��S#t$rtd���wxYw)Nz(Port argument must be an integer or None)�int� TypeError)r0r%s r1r.zURL._assert_port�sL�� �<��4� H��t�9�9� ��� H� H� H��F�G�G� G� H���s��/�v� paramnamec�T�t|t��std|z���|S)Nz%s must be a string�� isinstancerr6�r0r7r8s r1r,zURL._assert_str�s-���!�S�!�!� ?��1�I�=�>�>� >��r3c�6�|�|S|�||��S�N)r,r<s r1r-zURL._assert_none_str�s"�� �9��H����q�)�,�,�,r3�dict_�iOptional[Union[Sequence[Tuple[str, Union[Sequence[str], str]]], Mapping[str, Union[Sequence[str], str]]]]c����|� tjStd d����tdd����d�fd � �dd ��t|tj��r|}n|���}tj��fd �|D����S)N�valrr*c��dSr>��rBs r1� _assert_valuez$URL._str_dict.<locals>._assert_value�s ���#r3� Sequence[str]�Union[str, Tuple[str, ...]]c��dSr>rDrEs r1rFz$URL._str_dict.<locals>._assert_values ��+.�#r3�Union[str, Sequence[str]]c���t|t��r|St|tj��rt �fd�|D����St d���)Nc3�.�K�|]}�|��V��dSr>rD)�.0�elemrFs �r1� <genexpr>z7URL._str_dict.<locals>._assert_value.<locals>.<genexpr>s-�����A�A�T�]�]�4�0�0�A�A�A�A�A�Ar3z?Query dictionary values must be strings or sequences of strings)r;r�collections_abcr �tupler6)rBrFs �r1rFz$URL._str_dict.<locals>._assert_value sk����#�s�#�#� �� ��C��!9�:�:� ��A�A�A�A�S�A�A�A�A�A�A��+���r3r7c�N�t|t��std���|S)Nz%Query dictionary keys must be stringsr:)r7s r1r,z"URL._str_dict.<locals>._assert_strs)���a��%�%� I�� G�H�H�H��Hr3c�@��i|]\}}�|���|����SrDrD)rM�key�valuer,rFs ��r1� <dictcomp>z!URL._str_dict.<locals>.<dictcomp>"sJ��� � � ��C��� �C� � �-�-��#�#� � � r3)rBrr*r)rBrGr*rH)rBrJr*rH)r7rr*r)r� EMPTY_DICTr r;rPr �items� immutabledict)r0r?� dict_itemsr,rFs @@r1r/z URL._str_dict�s����� �=��?� "� � � � � �� � � .� .� .� �� .� � � � � � � � � � � �e�_�5� 6� 6� '��J�J������J��!� � � � � �#-�  � � � � � r3�1Optional[Mapping[str, Union[Sequence[str], str]]]c��i}|�||d<|�||d<|�||d<|�||d<|�||d<|�||d<|�||d<|jd i|��S) areturn a new :class:`_engine.URL` object with modifications. Values are used if they are non-None. To set a value to ``None`` explicitly, use the :meth:`_engine.URL._replace` method adapted from ``namedtuple``. :param drivername: new drivername :param username: new username :param password: new password :param host: new hostname :param port: new port :param query: new query parameters, passed a dict of string keys referring to string or sequence of string values. Fully replaces the previous list of arguments. :return: new :class:`_engine.URL` object. .. versionadded:: 1.4 .. seealso:: :meth:`_engine.URL.update_query_dict` Nrr!r"r#r%r&r(rD)�_assert_replace) �selfrr!r"r#r%r&r(�kws r1�setzURL.set*s���F �� � !�)�B�|� � � �%�B�z�N� � �%�B�z�N� � ��B�v�J� � ��B�v�J� � �%�B�z�N� � ��B�w�K�#�t�#�)�)�b�)�)�)r3r_rc �(�d|vr|�|dd��dD]"}||vr|�|||���#d|vr|�|d��d|vr|�|d��|d<|jdi|��S)z)argument checks before calling _replace()r)r!r#r&r%r(rD)r,r-r.r/�_replace)r^r_�names r1r]zURL._assert_replace_s��� �2� � � � � �R� �-�|� <� <� <�2� 6� 6�D��r�z�z��%�%�b��h��5�5�5�� �R�<�<� � � �b��j� )� )� )� �b�=�=��.�.��G��5�5�B�w�K��t�}�"�"�r�"�"�"r3F� query_string�append�boolc�J�|�t|��|���S)akReturn a new :class:`_engine.URL` object with the :attr:`_engine.URL.query` parameter dictionary updated by the given query string. E.g.:: >>> from sqlalchemy.engine import make_url >>> url = make_url("postgresql+psycopg2://user:pass@host/dbname") >>> url = url.update_query_string( ... "alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt" ... ) >>> str(url) 'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt' :param query_string: a URL escaped query string, not including the question mark. :param append: if True, parameters in the existing query string will not be removed; new parameters will be in addition to those present. If left at its default of False, keys present in the given query parameters will replace those of the existing query string. .. versionadded:: 1.4 .. seealso:: :attr:`_engine.URL.query` :meth:`_engine.URL.update_query_dict` �re)�update_query_pairsr)r^rdres r1�update_query_stringzURL.update_query_stringns&��B�&�&�y��'>�'>�v�&�N�N�Nr3�key_value_pairs�+Iterable[Tuple[str, Union[str, List[str]]]]c���|j�i}|D]�\}}||vrZtj||��||<td||���tt |�����ct |ttf��rt|��n|||<��|r�i}|D]W}|�vrFttj�|��tj||��z��||<�L||||<�X|� �fd�t���� |��D����n6|j� d�|� ��D����}|� |���S)aReturn a new :class:`_engine.URL` object with the :attr:`_engine.URL.query` parameter dictionary updated by the given sequence of key/value pairs E.g.:: >>> from sqlalchemy.engine import make_url >>> url = make_url("postgresql+psycopg2://user:pass@host/dbname") >>> url = url.update_query_pairs( ... [ ... ("alt_host", "host1"), ... ("alt_host", "host2"), ... ("ssl_cipher", "/path/to/crt"), ... ] ... ) >>> str(url) 'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt' :param key_value_pairs: A sequence of tuples containing two strings each. :param append: if True, parameters in the existing query string will not be removed; new parameters will be in addition to those present. If left at its default of False, keys present in the given query parameters will replace those of the existing query string. .. versionadded:: 1.4 .. seealso:: :attr:`_engine.URL.query` :meth:`_engine.URL.difference_update_query` :meth:`_engine.URL.set` � List[str]c�"��i|] }|�|�� SrDrD)rM�k�existing_querys �r1rVz*URL.update_query_pairs.<locals>.<dictcomp>�s0��������~�a�(���r3c�b�i|],\}}|t|t��rt|��n|��-SrD)r;�listrQ�rMrpr7s r1rVz*URL.update_query_pairs.<locals>.<dictcomp>�sG�������1��:�a��#6�#6�=�u�Q�x�x�x�A���r3�r()r(r�to_listrrerr;rsrQ�updater`� difference�unionrX) r^rkre�new_keysrTrU� new_queryrprqs @r1rizURL.update_query_pairs�s����V���57��)� � �J�C���h��� $� �X�c�]� ;� ;��� ��[�(�3�-�0�0�7�7��S�%�8H�8H�I�I�I�I�$.�e�d�E�]�#C�#C�N�D��K�K�K���� � � � ��I�� /� /����&�&�#(�� �^�A�%6�7�7��,�x��{�3�3�4�$�$�I�a�L�L� $,�A�;�I�a�L�L� � � ����� ��0�0�;�;�H�E�E���� � � � �� �(�(��� (��� 0� 0������I� �x�x�i�x�(�(�(r3�query_parameters�#Mapping[str, Union[str, List[str]]]c�T�|�|���|���S)a�Return a new :class:`_engine.URL` object with the :attr:`_engine.URL.query` parameter dictionary updated by the given dictionary. The dictionary typically contains string keys and string values. In order to represent a query parameter that is expressed multiple times, pass a sequence of string values. E.g.:: >>> from sqlalchemy.engine import make_url >>> url = make_url("postgresql+psycopg2://user:pass@host/dbname") >>> url = url.update_query_dict( ... {"alt_host": ["host1", "host2"], "ssl_cipher": "/path/to/crt"} ... ) >>> str(url) 'postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt' :param query_parameters: A dictionary with string keys and values that are either strings, or sequences of strings. :param append: if True, parameters in the existing query string will not be removed; new parameters will be in addition to those present. If left at its default of False, keys present in the given query parameters will replace those of the existing query string. .. versionadded:: 1.4 .. seealso:: :attr:`_engine.URL.query` :meth:`_engine.URL.update_query_string` :meth:`_engine.URL.update_query_pairs` :meth:`_engine.URL.difference_update_query` :meth:`_engine.URL.set` rh)rirX)r^r|res r1�update_query_dictzURL.update_query_dict�s+��b�&�&�'7�'=�'=�'?�'?��&�O�O�Or3�names� Iterable[str]c�B��t|����j��s�St�j�j�j�j�j�j tj �fd�t�j��� |��D������S)a� Remove the given names from the :attr:`_engine.URL.query` dictionary, returning the new :class:`_engine.URL`. E.g.:: url = url.difference_update_query(["foo", "bar"]) Equivalent to using :meth:`_engine.URL.set` as follows:: url = url.set( query={ key: url.query[key] for key in set(url.query).difference(["foo", "bar"]) } ) .. versionadded:: 1.4 .. seealso:: :attr:`_engine.URL.query` :meth:`_engine.URL.update_query_dict` :meth:`_engine.URL.set` c�,��i|]}|�j|��SrDru)rMrTr^s �r1rVz/URL.difference_update_query.<locals>.<dictcomp>@s1����������C����r3) r`� intersectionr(rrr!r"r#r%r&rrYrx)r^r�s` r1�difference_update_queryzURL.difference_update_querys����<�5�z�z�&�&�t�z�2�2� ��K�� �O� �M� �M� �I� �I� �M� � �����"�4�:���9�9�%�@�@���� � �  �  � r3�Mapping[str, Sequence[str]]c�l�tjd�|j���D����S)a&Return the :attr:`_engine.URL.query` dictionary with values normalized into sequences. As the :attr:`_engine.URL.query` dictionary may contain either string values or sequences of string values to differentiate between parameters that are specified multiple times in the query string, code that needs to handle multiple parameters generically will wish to use this attribute so that all parameters present are presented as sequences. Inspiration is from Python's ``urllib.parse.parse_qs`` function. E.g.:: >>> from sqlalchemy.engine import make_url >>> url = make_url( ... "postgresql+psycopg2://user:pass@host/dbname?alt_host=host1&alt_host=host2&ssl_cipher=%2Fpath%2Fto%2Fcrt" ... ) >>> url.query immutabledict({'alt_host': ('host1', 'host2'), 'ssl_cipher': '/path/to/crt'}) >>> url.normalized_query immutabledict({'alt_host': ('host1', 'host2'), 'ssl_cipher': ('/path/to/crt',)}) c�J�i|] \}}|t|t��s|fn|��!SrD)r;rQrts r1rVz(URL.normalized_query.<locals>.<dictcomp>asC�� � � ��A�q��z�!�U�3�3�:�A�4�4�� � � r3)rrYr(rX�r^s r1�normalized_queryzURL.normalized_queryGsC��2�!� � � �J�,�,�.�.� � � � � � r3�1.4z�The :meth:`_engine.URL.__to_string__ method is deprecated and will be removed in a future release. Please use the :meth:`_engine.URL.render_as_string` method.T� hide_passwordc�.�|�|���S)z�Render this :class:`_engine.URL` object as a string. :param hide_password: Defaults to True. The password is not shown in the string unless this is set to False. )r���render_as_string)r^r�s r1� __to_string__zURL.__to_string__gs���$�$�=�$�A�A�Ar3c�6���jdz}�j�R|t�jd���z }�j�-|d|rdn"tt �j��d���zz }|dz }�j�"d�jvr|d�j�d �z }n |�jz }�j�|dt �j��zz }�j� |d �jzz }�jrOt�j��}|� ��|d d � �fd �|D����zz }|S)aRRender this :class:`_engine.URL` object as a string. This method is used when the ``__str__()`` or ``__repr__()`` methods are used. The method directly includes additional options. :param hide_password: Defaults to True. The password is not shown in the string unless this is set to False. z://Nz +)�safe�:z***�@�[�]�/�?�&c3��K�|]G}tj�j|��D]%}t|���dt|����V��&�HdS)�=N)rrvr(r)rMrp�elementr^s �r1rOz'URL.render_as_string.<locals>.<genexpr>�sz����� � ��#�|�D�J�q�M�:�:� � ���a�=�=�8�8�:�g�#6�#6�8�8� � � � � � � r3) rr!rr"rr#r%r&r(rs�sort�join)r^r��s�keyss` r1r�zURL.render_as_stringvsb��� �O�e� #�� �=� $� ��t�}�4�0�0�0� 0�A��}�(��S�$�>�E�E��s�4�=�1�1��=�=�=���� ��H�A� �9� ��d�i����%���%�%�%�%����T�Y��� �9� � ��s�4�9�~�~�%� %�A� �=� $� ��t�}�$� $�A� �:� ��� �#�#�D� �I�I�K�K�K� ��s�x�x� � � � �� � � ���� �A� �r3c�*�|���Sr>r�r�s r1�__repr__z URL.__repr__�s���$�$�&�&�&r3c ��|j�|j|j|j|j|j|j|j��Sr>) � __class__r2rr!r"r#r%r&r(r�s r1�__copy__z URL.__copy__�sA���~�$�$� �O� �M� �M� �I� �I� �M� �J�  �  � r3�memoc�*�|���Sr>)r�)r^r�s r1� __deepcopy__zURL.__deepcopy__�s���}�}���r3r5c�:�tt|����Sr>)�hashrr�s r1�__hash__z URL.__hash__�s���C��I�I���r3�otherc� �t|t��oo|j|jko_|j|jkoO|j|jko?|j|jko/|j|jko|j|jko|j|jkSr>) r;rrr!r"r#r&r(r%�r^r�s r1�__eq__z URL.__eq__�s��� �u�c� "� "� (���5�#3�3� (�� ���/� (�� ���/� (�� �U�Z�'�  (� � ���/�  (� � �e�k�)�  (�� �U�Z�'� r3c��||k Sr>rDr�s r1�__ne__z URL.__ne__�s���5�=� � r3c�b�d|jvr|jS|j�d��dS)z�Return the backend name. This is the name that corresponds to the database backend in use, and is the portion of the :attr:`_engine.URL.drivername` that is to the left of the plus sign. �+r)r�splitr�s r1�get_backend_namezURL.get_backend_name�s4�� �d�o� %� %��?� "��?�(�(��-�-�a�0� 0r3c��d|jvr|���jS|j�d��dS)a�Return the backend name. This is the name that corresponds to the DBAPI driver in use, and is the portion of the :attr:`_engine.URL.drivername` that is to the right of the plus sign. If the :attr:`_engine.URL.drivername` does not include a plus sign, then the default :class:`_engine.Dialect` for this :class:`_engine.URL` is imported in order to get the driver name. r�r)r� get_dialect�driverr�r�s r1�get_driver_namezURL.get_driver_name�sA�� �d�o� %� %��#�#�%�%�,� ,��?�(�(��-�-�a�0� 0r3�kwargs�Mapping[str, Any]�%Tuple[URL, List[Any], Dict[str, Any]]c�n���tj�j�dd����}|��dg��z }t ������fd�|D��}��ddg��}|D]}|�|��}|�|}���dd��||�fS)N�pluginrDrc�L��g|] }tj|��������!SrD)r�load)rM� plugin_namer�r^s ��r1� <listcomp>z,URL._instantiate_plugins.<locals>.<listcomp>�s?��� � � �� &�G�L�� %� %�d�F� 3� 3� � � r3)rrvr(�get�dictr�� update_url�pop)r^r�� plugin_names�loaded_plugins�ur��new_us`` r1�_instantiate_pluginszURL._instantiate_plugins�s������|�D�J�N�N�8�R�$@�$@�A�A� ��� � �9�b�1�1�1� ��f���� � � � � �+� � � �� � (� (�(�I�)>� ?� ?��$� � �F��%�%�a�(�(�E�� ����� � �9�d�#�#�#��.�&�(�(r3� Type[Dialect]c�8�d|jvr|j}n|j�dd��}tj|��}t |d��r;t |jt��r!t|jt��r|jStd|��S)z�Return the "entry point" dialect class. This is normally the dialect itself except in the case when the returned class implements the get_dialect_cls() method. r��.�dialectr�) r�replacerr��hasattrr;r��type� issubclassrr)r^rcr0s r1�_get_entrypointzURL._get_entrypoint�s��� �d�o� %� %��?�D�D��?�*�*�3��4�4�D��m�D�!�!�� �C�� #� #� .��3�;��-�-� .��3�;��0�0� .� �;� ����-�-� -r3� _is_asyncc��|���}|r|�|��}n|�|��}|S)zoReturn the SQLAlchemy :class:`_engine.Dialect` class corresponding to this URL's driver name. )r��get_async_dialect_cls�get_dialect_cls)r^r�� entrypoint� dialect_clss r1r�zURL.get_dialectsK�� �)�)�+�+� � � ;�$�:�:�4�@�@�K�K�$�4�4�T�:�:�K��r3�Optional[List[str]]�Dict[str, Any]c �2�|�tjdd��i}gd�}|D]v}|r|�d��}n||vr ||}n|}|�Kt||d��r:|dkr!t t||����||<�ct||��||<�w|S)a2Translate url attributes into a dictionary of connection arguments. Returns attributes of this url (`host`, `database`, `username`, `password`, `port`) as a plain dictionary. The attribute names are used as the keys by default. Unset or false attributes are omitted from the final dictionary. :param \**kw: Optional, alternate key names for url attributes. :param names: Deprecated. Same purpose as the keyword-based alternate names, but correlates the name to the original positionally. NzpThe `URL.translate_connect_args.name`s parameter is deprecated. Please pass the alternate names as kw arguments.r�)r#r&r!r"r%rFr")r�warn_deprecatedr��getattrr)r^r�r_� translated�attribute_names�snamercs r1�translate_connect_argszURL.translate_connect_argss��� � � � �3��  � � �� �N�N�N��$� <� <�E�� ��y�y��|�|����"����%�y�������G�D�%��$?�$?���J�&�&�'*�7�4��+?�+?�'@�'@�J�t�$�$�'.�t�U�';�';�J�t�$���r3)rrr!r r"r r#r r%r$r&r r(r)r*r)r%r$r*r$)r7rr8rr*r)r7r r8rr*r )r?r@r*r')NNNNNNN)rr r!r r"r r#r r%r$r&r r(r[r*r)r_rr*r)F)rdrrerfr*r)rkrlrerfr*r)r|r}rerfr*r)r�r�r*r)r*r�)T)r�rfr*r)r*r)r*r)r�rr*r)r*r5)r�rr*rf)r�r�r*r�)r*r�)r�rfr*r�r>)r�r�r_rr*r�)$�__name__� __module__� __qualname__�__doc__�__annotations__� classmethodrrWr2r.r,r-r/r`r]rjrirr��propertyr�� deprecatedr�r�r�r�r�r�r�r�r�r�r�r�r�r�rDr3r1rr.s��������0�0�d�O�O�O�� ���������/����������������?�?�?�?��>�#'�"&�"�"�"&�9=��? �? �? �? ��[�? �B�H�H�H��[�H������[�� �-�-�-��[�-��5 �5 �5 ��[�5 �r%)�"&�"&�"�"�"&�CG�3*�3*�3*�3*�3*�j #� #� #� #� 16�!O�!O�!O�!O�!O�L�Q)�Q)�Q)�Q)�Q)�l�1P�1P�1P�1P�1P�f. �. �. �. �`� � � ��X� �>�T�_� � 7��� B�B�B�B� �� B�%�%�%�%�%�N'�'�'�'�  �  �  �  ���������  �  �  �  �!�!�!�!� 1� 1� 1� 1�1�1�1�1�$)�)�)�)�0.�.�.�.�0 � � � � �,0�'�'�'�'�'�'�'r3r� name_or_url�Union[str, URL]r*c���t|t��rt|��St|t��s't |d��st jd|�����|S)a�Given a string, produce a new URL instance. The format of the URL generally follows `RFC-1738 <https://www.ietf.org/rfc/rfc1738.txt>`_, with some exceptions, including that underscores, and not dashes or periods, are accepted within the "scheme" portion. If a :class:`.URL` object is passed, it is returned as is. .. seealso:: :ref:`database_urls` �)_sqla_is_testing_if_this_is_a_mock_objectz#Expected string or URL object, got )r;r� _parse_urlrr�r� ArgumentError)r�s r1�make_urlr�Gsw�� �+�s�#�#� ��+�&�&�&� � �S� )� )��'��@�3�3���� A�+� A� A� � � ��r3rcrc�0�tjdtj��}|�|��}|��I|���}|d�ni}t |d��D]U\}}||vrGt j||��||<td||��� |���P|||<�Vnd}||d<|d�t|d��|d<|d�t|d��|d<|� d��}|� d��}|p||d<|� d ��}|d rt|d ��|d <tj|fi|��Stjd |z���) Na� (?P<name>[\w\+]+):// (?: (?P<username>[^:/]*) (?::(?P<password>[^@]*))? @)? (?: (?: \[(?P<ipv6host>[^/\?]+)\] | (?P<ipv4host>[^/:\?]+) )? (?::(?P<port>[^/\?]*))? )? (?:/(?P<database>[^\?]*))? (?:\?(?P<query>.*))? r(rnr!r"�ipv4host�ipv6hostr#rcr%z/Could not parse SQLAlchemy URL from string '%s')�re�compile�X�match� groupdictrrrvrrerr�r5rr2rr�) rc�pattern�m� componentsr(rTrUr�r�s r1r�r�cs����j� � ��#��G�( � � �d���A��}��[�[�]�]� � �g� � *��E�'� �7�(;�<�<� '� '� ��U��%�<�<�!%��e�C�j�!9�!9�E�#�J���e�C�j�1�1�8�8��?�?�?�?�!&�E�#�J�J�  '��E�#� �7�� �j� !� -�%,�Z� �-C�%D�%D�J�z� "� �j� !� -�%,�Z� �-C�%D�%D�J�z� "��>�>�*�-�-���>�>�*�-�-��%�1�� �6���~�~�f�%�%�� �f� � 9�!$�Z��%7�!8�!8�J�v� ��z�$�-�-�*�-�-�-��� =�� D� � � r3)r�r�r*r)rcrr*r)%r�� __future__r�collections.abc�abcrPr��typingrrrrrr r r r r rrr� urllib.parserrrr� interfacesr�rr�dialectsrrrr�r�rDr3r1�<module>rs/����#�"�"�"�"�"�)�)�)�)�)�)� � � � �������������������������������������������������������������������������������"�"�"�"�"�"�������#�#�#�#�#�#� � � � � � �������������������������������V �V �V �V �V �*�V �V �V �r����89 �9 �9 �9 �9 �9 r3
Memory