]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Replace custom URL-encoding method with quote
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Dec 2023 19:10:28 +0000 (14:10 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Dec 2023 21:10:57 +0000 (16:10 -0500)
commit4438883c9703affa3f441be9a230a5f751905a05
tree2fc153fd7541cc3c9da7a3f5b7f52f39e7e8c295
parent1acca3d6c6cf035c36ddfa1f281b4932ace18b24
Replace custom URL-encoding method with quote

Fixed URL-encoding of the username and password components of
:class:`.engine.URL` objects when converting them to string using the
:meth:`_engine.URL.render_as_string` method, by using Python standard
library ``urllib.parse.quote`` while allowing for plus signs and spaces to
remain unchanged as supported by SQLAlchemy's non-standard URL parsing,
rather than the legacy home-grown routine from many years ago. Pull request
courtesy of Xavier NUNN.

Fixes: #10662
Closes: #10726
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10726
Pull-request-sha: 82219041b8f73d8c932cc40e87c002b3b853e02e
Change-Id: Iedca4929579d4d26ef8cce083252dcd1e476286b
doc/build/changelog/unreleased_20/10662.rst [new file with mode: 0644]
lib/sqlalchemy/engine/url.py
test/engine/test_parseconnect.py