From 29ffe2ca2af2ee5390c2f195f2c5de0e73a769a2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 9 Jan 2024 13:45:52 -0500 Subject: [PATCH] Add note that password parameter is not to be url encoded References: #10852 Change-Id: Ifa44513ce315214fa5d1b55d3e92b53889caeacc (cherry picked from commit d9ed5cb521d5e7a2b62646b43eaebc1ccf084b40) --- lib/sqlalchemy/engine/url.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 31e94f441a..db4f2879c7 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -171,6 +171,11 @@ class URL(NamedTuple): :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`. -- 2.47.2