diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-02-08 12:42:36 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-02-08 12:42:36 -0500 |
| commit | 22b31818666d0c3a7f527d06354b6bcdb1304c90 (patch) | |
| tree | d7004c0067ee548bcb82dd5888219e3e3bff30f1 /lib/sqlalchemy/engine | |
| parent | b6195b1f755768066c78db7575275052a3e2daaa (diff) | |
| download | sqlalchemy-22b31818666d0c3a7f527d06354b6bcdb1304c90.tar.gz | |
The cx_oracle dialect will no longer run the bind parameter names
through ``encode()``, as this is not valid on Python 3, and prevented
statements from functioning correctly on Python 3. We now
encode only if ``supports_unicode_binds`` is False, which is not
the case for cx_oracle when at least version 5 of cx_oracle is used.
Diffstat (limited to 'lib/sqlalchemy/engine')
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 918b45213..1db0f2ce4 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -744,7 +744,9 @@ class DefaultExecutionContext(interfaces.ExecutionContext): (not exclude_types or dbtype not in exclude_types): if translate: key = translate.get(key, key) - inputsizes[self.dialect._encoder(key)[0]] = dbtype + if not self.dialect.supports_unicode_binds: + key = self.dialect._encoder(key)[0] + inputsizes[key] = dbtype try: self.cursor.setinputsizes(**inputsizes) except Exception, e: |
