From: Mike Bayer Date: Wed, 10 Oct 2012 17:22:57 +0000 (-0400) Subject: - [bug] changed the list of cx_oracle types that are X-Git-Tag: rel_0_7_10~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fbbecbf16a385f46674fb41db25ab58844dcc2b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - [bug] changed the list of cx_oracle types that are excluded from the setinputsizes() step to only include STRING and UNICODE; CLOB and NCLOB are removed. This is to work around cx_oracle behavior which is broken for the executemany() call. In 0.8, this same change is applied however it is also configurable via the exclude_setinputsizes argument. [ticket:2561] --- diff --git a/CHANGES b/CHANGES index 9b1bb4e6de..0c795c2715 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,15 @@ CHANGES or by primary key switch of another instance. [ticket:2583] +- oracle + - [bug] changed the list of cx_oracle types that are + excluded from the setinputsizes() step to only include + STRING and UNICODE; CLOB and NCLOB are removed. This + is to work around cx_oracle behavior which is broken + for the executemany() call. In 0.8, this same change + is applied however it is also configurable via the + exclude_setinputsizes argument. [ticket:2561] + - mysql - [feature] Added "raise_on_warnings" flag to OurSQL dialect. [ticket:2523] diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index 116f6ada78..dbf53b0ea2 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -337,7 +337,7 @@ class OracleExecutionContext_cx_oracle(OracleExecutionContext): # on String, including that outparams/RETURNING # breaks for varchars self.set_input_sizes(quoted_bind_names, - exclude_types=self.dialect._cx_oracle_string_types + exclude_types=self.dialect._cx_oracle_exclude_setinputsizes ) # if a single execute, check for outparams @@ -507,6 +507,7 @@ class OracleDialect_cx_oracle(OracleDialect): getattr(self.dbapi, name, None) for name in names ]).difference([None]) + self._cx_oracle_exclude_setinputsizes = types("STRING", "UNICODE") self._cx_oracle_string_types = types("STRING", "UNICODE", "NCLOB", "CLOB") self._cx_oracle_unicode_types = types("UNICODE", "NCLOB") self._cx_oracle_binary_types = types("BFILE", "CLOB", "NCLOB", "BLOB")