diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-03-30 15:49:30 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-03-30 15:49:30 +0000 |
commit | 849ba3d620823fa897eeaaecbb22393d6e9623e7 (patch) | |
tree | 3d517b75e9c2596cf8211042cb4e94e3274e277d /lib/sqlalchemy/engine/url.py | |
parent | dab9abf7893333b7dabaee6de6cddfd93df7169a (diff) | |
download | sqlalchemy-849ba3d620823fa897eeaaecbb22393d6e9623e7.tar.gz |
- query strings in unicode URLs get keys encoded to ascii
for **kwargs compat
Diffstat (limited to 'lib/sqlalchemy/engine/url.py')
-rw-r--r-- | lib/sqlalchemy/engine/url.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 353a9f840..edb8cf32e 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -131,6 +131,8 @@ def _parse_rfc1738_args(name): tokens = database.split(r"?", 2) database = tokens[0] query = (len(tokens) > 1 and dict( cgi.parse_qsl(tokens[1]) ) or None) + if query is not None: + query = dict([(k.encode('ascii'), query[k]) for k in query]) else: query = None opts = {'username':username,'password':password,'host':host,'port':port,'database':database, 'query':query} |