By cj on Jun 22, 2015
Anthony Tuininga just released an updated Python cx_Oracle 5.2 driver for Oracle Database. This release brings a number of enhancements, many of them for Oracle Database 12c features such as longer VARCHARS.
cx_Oracle 5.2 is the first release Oracle has contributed code for (thanks Avinash!) so we're pretty happy all around. And a big thank you to all the other contributors and users who have made this release possible.
The new code features are:
- Support for Oracle Database 12c strings up to 32k characters.
- Support for LOB values larger than 4 GB.
- Support for Oracle Database 12c array DML row counts.
- Support for fetching batch errors.
- Support for connections as SYSASM.
- Added types NCHAR, FIXED_NCHAR and LONG_NCHAR to replace the types UNICODE, FIXED_UNICODE and LONG_UNICODE (which are now deprecated). These types are available in Python 3 as well so they can be used to specify the use of NCHAR type fields when binding or using setinputsizes().
- Support for building without any configuration changes to the machine when using instant client RPMs on Linux.
- Fixed session releasing to the pool when calling connection.close() (Issue #2)
- Fixed binding of booleans in Python 3.x.
- Added __version__ attribute to conform with PEP 396.
- Fixed handling of datetime intervals (Issue #7)
The complete release notes are here.
My favorite feature is the installation improvement. (Disclaimer: I contributed the initial implementation!) With this change, Instant Client RPMS on Linux can now be used. The best bit is cx_Oracle will automatically locate Instant Client and will then also automatically build using rpath. The installation of cx_Oracle on Linux is now as simple as installing the Instant Client Basic & SDK RPMs, and running 'pip install cx_Oracle'. No need to set ORACLE_HOME during installation. No need to set LD_LIBRARY_PATH at runtime. If you have a Linux ULN support subscription you can install Instant Client via yum, which makes it even simpler.
Users of Database Resident Connection Pooling will like the connection.close() fix since it allows DRCP to be used effectively without requiring a cx_Oracle session pool.
In summary the cx_Oracle 5.2 release adds great features to the already impressive Oracle Database support available to Python applications. Application development and deployment just got better.
Thanks again to Anthony, Avinash and all the contributors who have made cx_Oracle so good.