From 2800e34710672b408fa4a7bdd6d58d63a7128f04 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 24 Nov 2013 18:11:37 -0500 Subject: - The :func:`.create_engine` routine and the related :func:`.make_url` function **no longer URL encode the password**. Database passwords that include characters like spaces, plus signs and anything else should now represent these characters directly, without any URL escaping. [ticket:2873] --- lib/sqlalchemy/engine/url.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 8f84ab039..28c15299e 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -67,8 +67,7 @@ class URL(object): if self.username is not None: s += self.username if self.password is not None: - s += ':' + ('***' if hide_password - else util.quote_plus(self.password)) + s += ':' + ('***' if hide_password else self.password) s += "@" if self.host is not None: if ':' in self.host: @@ -170,7 +169,7 @@ def _parse_rfc1738_args(name): (?P[\w\+]+):// (?: (?P[^:/]*) - (?::(?P[^/]*))? + (?::(?P.*))? @)? (?: (?: @@ -195,10 +194,6 @@ def _parse_rfc1738_args(name): query = None components['query'] = query - if components['password'] is not None: - components['password'] = \ - util.unquote_plus(components['password']) - ipv4host = components.pop('ipv4host') ipv6host = components.pop('ipv6host') components['host'] = ipv4host or ipv6host -- cgit v1.2.1