From: Mike Bayer Date: Wed, 28 Apr 2010 17:30:25 +0000 (+0000) Subject: - oracle_xe 5 doesn't accept a Python unicode object in X-Git-Tag: rel_0_6_1~29^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7686386c0025c4364a7e34ef4b1fc71e6fc00374;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - oracle_xe 5 doesn't accept a Python unicode object in its connect string in normal Python 2.x mode - so we coerce to str() directly. non-ascii characters aren't supported in connect strings here since we don't know what encoding we could use. [ticket:1670] --- diff --git a/CHANGES b/CHANGES index a47f37289f..e66480da51 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,12 @@ CHANGES be used. This will impact decimal accuracy and some unicode handling issues. [ticket:1775] + - oracle_xe 5 doesn't accept a Python unicode object in + its connect string in normal Python 2.x mode - so we coerce + to str() directly. non-ascii characters aren't supported + in connect strings here since we don't know what encoding + we could use. [ticket:1670] + - firebird - Added a label to the query used within has_table() and has_sequence() to work with older versions of Firebird diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index dd6763c096..80c0cc67f1 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -505,6 +505,11 @@ class OracleDialect_cx_oracle(OracleDialect): for k, v in opts.items(): if isinstance(v, str): opts[k] = unicode(v) + else: + for k, v in opts.items(): + if isinstance(v, unicode): + opts[k] = str(v) + # end Py2K if 'mode' in url.query: