diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2017-07-28 18:06:21 -0400 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@awstats.zzzcomputing.com> | 2017-07-28 18:06:21 -0400 |
| commit | ace88cdd2ce154feffa9105e85bd6984cc76715b (patch) | |
| tree | 19b1404eb5caff58e8960e508e10328e5f80c80d /lib | |
| parent | 2ae2c25c5d24c26fdca979b091cd432c64be822d (diff) | |
| parent | 7997d7fdc3634e7dba9fd0113b8b85ef311bfeaa (diff) | |
| download | sqlalchemy-ace88cdd2ce154feffa9105e85bd6984cc76715b.tar.gz | |
Merge "Revert cx_Oracle WITH_UNICODE change under > 5.0"
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/dialects/oracle/cx_oracle.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index f6c3c97b7..4e9f6314b 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -723,19 +723,28 @@ class OracleDialect_cx_oracle(OracleDialect): self._cx_oracle_string_types = set() self._cx_oracle_with_unicode = False elif util.py3k or ( - self.cx_oracle_ver >= (5,) and not \ + self.cx_oracle_ver >= (5,) and + self.cx_oracle_ver < (5, 1) and not hasattr(self.dbapi, 'UNICODE') ): # cx_Oracle WITH_UNICODE mode. *only* python - # unicode objects accepted for anything + # unicode objects accepted for anything. This + # mode of operation is implicit for Python 3, + # however under Python 2 it existed as a never-used build-time + # option for cx_Oracle 5.0 only and was removed in 5.1. self.supports_unicode_statements = True self.supports_unicode_binds = True self._cx_oracle_with_unicode = True if util.py2k: # There's really no reason to run with WITH_UNICODE under - # Python 2.x. However as of cx_oracle 5.3 it seems to be - # set to ON for default builds + # Python 2.x. Give the user a hint. + util.warn( + "cx_Oracle is compiled under Python 2.xx using the " + "WITH_UNICODE flag. Consider recompiling cx_Oracle " + "without this flag, which is in no way necessary for " + "full support of Unicode and causes significant " + "performance issues.") self.execution_ctx_cls = \ OracleExecutionContext_cx_oracle_with_unicode else: |
