]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
ensure with_unicode flag is false for cx_oracle < 5
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Mar 2010 18:56:05 +0000 (13:56 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Mar 2010 18:56:05 +0000 (13:56 -0500)
lib/sqlalchemy/dialects/oracle/cx_oracle.py

index 32c52b4e640ff91a149ef014f45281d426f424b2..aaa6ca1d88e155585b4044ec95d0b821c980140a 100644 (file)
@@ -347,11 +347,11 @@ class Oracle_cx_oracle(OracleDialect):
             # this occurs in tests with mock DBAPIs
             self._cx_oracle_string_types = set()
             self._cx_oracle_with_unicode = False
-        elif not hasattr(self.dbapi, 'UNICODE'):
+        elif cx_oracle_ver >= (5,) and not hasattr(self.dbapi, 'UNICODE'):
             # cx_Oracle WITH_UNICODE mode.  *only* python
             # unicode objects accepted for anything
-            self.supports_unicode_statements = cx_oracle_ver >= (5, 0)
-            self.supports_unicode_binds = cx_oracle_ver >= (5, 0)
+            self.supports_unicode_statements = True
+            self.supports_unicode_binds = True
             self._cx_oracle_with_unicode = True
         else:
             self._cx_oracle_with_unicode = False