]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Revert cx_Oracle WITH_UNICODE change under > 5.0
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Jul 2017 19:05:25 +0000 (15:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Jul 2017 21:42:22 +0000 (17:42 -0400)
commit9689bb85f1a9a42ca542395c8f6657626b5d817b
tree1f6fb421a9cafad90a47bcf2b63ef6e16164bffd
parentf7beeb389d242d1c0fe56c22349f5dcc23722bde
Revert cx_Oracle WITH_UNICODE change under > 5.0

Fixed performance regression caused by the fix for :ticket:`3937` where
cx_Oracle as of version 5.3 dropped the ``.UNICODE`` symbol from its
namespace,  which was interpreted as cx_Oracle's "WITH_UNICODE" mode being
turned on unconditionally, which invokes functions on the SQLAlchemy
side which convert all strings to unicode unconditionally and causing
a performance impact.  In fact, per cx_Oracle's author the
"WITH_UNICODE" mode has been removed entirely as of 5.1, so the expensive unicode
conversion functions are no longer necessary and are disabled if
cx_Oracle 5.1 or greater is detected under Python 2.  The warning against
"WITH_UNICODE" mode that was removed under :ticket:`3937` is also restored.

Change-Id: Iddd38d81a5adb27c953a5ee2eae5529a21da16e1
Fixes: #4035
(cherry picked from commit 7997d7fdc3634e7dba9fd0113b8b85ef311bfeaa)
doc/build/changelog/unreleased_10/4035.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/oracle/cx_oracle.py