From: Federico Caselli Date: Tue, 29 Mar 2022 20:49:47 +0000 (+0200) Subject: Add links to database url section from URL docs X-Git-Tag: rel_2_0_0b1~389^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8550d182a803bf6acca9a2729a008f0a505ddf21;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add links to database url section from URL docs Change-Id: Ifa6dc14bf95762b9477560f485f43efa11af421b --- diff --git a/doc/build/core/engines.rst b/doc/build/core/engines.rst index c277e7b237..0a9d5dcd42 100644 --- a/doc/build/core/engines.rst +++ b/doc/build/core/engines.rst @@ -72,8 +72,8 @@ will be imported if available - this default is typically the most widely known driver available for that backend. As the URL is like any other URL, **special characters such as those that may -be used in the password need to be URL encoded to be parsed correctly.**. Below -is an example of a URL that includes the password ``"kx%jj5/g"``, where the +be used in the user and password need to be URL encoded to be parsed correctly.**. +Below is an example of a URL that includes the password ``"kx%jj5/g"``, where the percent sign and slash characters are represented as ``%25`` and ``%2F``, respectively:: diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 306989e0ba..5558b397c5 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -52,7 +52,7 @@ class URL(NamedTuple): format of the URL is an RFC-1738-style string. To create a new :class:`_engine.URL` object, use the - :func:`_engine.url.make_url` function. To construct a :class:`_engine.URL` + :func:`.make_url` function. To construct a :class:`_engine.URL` programmatically, use the :meth:`_engine.URL.create` constructor. .. versionchanged:: 1.4 @@ -66,6 +66,10 @@ class URL(NamedTuple): :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 @@ -109,6 +113,10 @@ class URL(NamedTuple): ) -> URL: """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. @@ -773,6 +781,10 @@ def make_url(name_or_url: Union[str, URL]) -> URL: The given string is parsed according to the RFC 1738 spec. If an existing URL object is passed, just returns the object. + .. seealso:: + + :ref:`database_urls` + """ if isinstance(name_or_url, str):