cx_Oracle 6.0
Anthony Tuininga <[email protected]> Mon, 14 Aug 2017 16:33:03 -0600
| Newsgroups | gmane.comp.python.db,gmane.comp.python.db.cx-oracle |
|---|---|
| Message-ID | <CAE1XR-7VV66mg99NaS0mT-CLK0rsAkoZRMjC-39PzFbTbhLgcg@mail.gmail.com> |
--===============4960777593633112241==
Content-Type: multipart/alternative; boundary="f403045fc05c01370a0556be3fd4"
--f403045fc05c01370a0556be3fd4
Content-Type: text/plain; charset="UTF-8"
What is cx_Oracle?
cx_Oracle is a Python extension module that enables access to Oracle
Database for Python 3.x and 2.x and conforms to the Python database API 2.0
specifications with a number of enhancements.
Where do I get it?
https://oracle.github.io/python-cx_Oracle
The easiest method to install cx_Oracle 6.0 is via pip as in
python -m pip install cx_Oracle --upgrade
What's new since 5.3?
This is the first production release of version 6.0. The complete release
notes can be found here: http://cx-oracle.readthe
docs.io/en/latest/releasenotes.html#version-6-0-august-2017.
A summary of the changes compared to version 5.3 is found below:
*Highlighted Enhancements*
- Has been re-implemented to use the new ODPI-C (
https://oracle.github.io/odpi) abstraction layer for Oracle Database. The
cx_Oracle API is unchanged. The cx_Oracle design, build and linking process
has improved because of ODPI-C.
- Now has Python Wheels available for install. This is made possible by the
ODPI-C architecture. Windows installers and Linux RPMs are no longer
produced since PyPI no longer supports them.
- Has less code in Python's Global Interpreter Lock, giving better
scalability.
- Added support for universal rowids.
- Added support for DML returning of multiple rows.
- Now associates LOB locators to LOB objects so they are not overwritten on
database round trips.
*Installation Changes*
- On Linux, cx_Oracle 6 no longer uses instant client RPMs automatically.
You must set LD_LIBRARY_PATH or use ldconfig to locate the Oracle Client
library.
- On platforms other than Windows, if ORACLE_HOME is set (in a database or
full client installation), remove requirement to set LD_LIBRARY_PATH in
order to locate the Oracle Client library (https://github.com/oracle/odp
i/issues/20).
*Connection Management Enhancements*
- Prevent closing the connection when there are any open statements or LOBs
and add new error "DPI-1054: connection cannot be closed when open
statements or LOBs exist" when this situation is detected; this is needed
to prevent crashes under certain conditions when statements or LOBs are
being acted upon while at the same time (in another thread) a connection is
being closed; it also prevents leaks of statements and LOBs when a
connection is returned to a session pool.
- Added attribute SessionPool.stmtcachesize to support getting and setting
the default statement cache size for connections in the pool.
- Added attribute Connection.dbop to support setting the database operation
that is to be monitored.
- Added attribute Connection.handle to facilitate testing the creation of a
connection using a OCI service context handle.
- Added parameters tag and matchanytag to the cx_Oracle.connect and
SessionPool.acquire methods and added parameters tag and retag to the
SessionPool.release method in order to support session tagging.
- Added parameter edition to the cx_Oracle.SessionPool method.
- Added parameters region, sharding_key and super_sharding_key to the
cx_Oracle.makedsn() method to support connecting to a sharded database (new
in Oracle Database 12.2).
- Removed requirement that encoding and nencoding both be specified when
creating a connection or session pool. The missing value is set to its
default value if one of the values is set and the other is not (
https://github.com/oracle/python-cx_Oracle/issues/36).
- Permit use of both string and unicode for Python 2.7 for creating
session pools and for changing passwords (https://github.com/oracle/pyt
hon-cx_Oracle/issues/23).
*Data Type and Data Handling Enhancements*
- Added attributes Variable.actualElements and Variable.values to
variables.
- Added support for smallint and float data types in Oracle objects, as
requested (https://github.com/oracle/python-cx_Oracle/issues/4).
- Added support for getting/setting attributes of objects or element values
in collections that contain LOBs, BINARY_FLOAT values, BINARY_DOUBLE values
and NCHAR and NVARCHAR2 values. The error message for any types that are
not supported has been improved as well.
- An exception is no longer raised when a collection is empty for methods
Object.first() and Object.last(). Instead, the value None is returned to be
consistent with the methods Object.next() and Object.prev().
- Removed requirement for specifying a maximum size when fetching LONG or
LONG raw columns. This also allows CLOB, NCLOB, BLOB and BFILE columns to
be fetched as strings or bytes without needing to specify a maximum size.
The method Cursor.setoutputsize no longer does anything, since ODPI-C
automatically manages buffer sizes of LONG and LONG RAW columns.
- Enable temporary LOB caching in order to avoid disk I/O as suggested (
https://github.com/oracle/odpi/issues/10).
*Error Handling Enhancements*
- Provide improved error message when OCI environment cannot be created,
such as when the oraaccess.xml file cannot be processed properly.
- Define exception classes on the connection object in addition to at
module scope in order to simplify error handling in multi-connection
environments, as specified in the Python DB API.
*Test Enhancements*
- Reworked test suite and samples so that they are independent of each
other and so that the SQL scripts used to create/drop schemas are easily
adjusted to use different schema names, if desired.
- Updated DB API test suite stub to support Python 3.
*Removals*
- Dropped deprecated parameter twophase from the cx_Oracle.connect method.
Applications should set the Connection.internal_name and
Connection.external_name attributes instead to a value appropriate to the
application.
- Dropped deprecated parameters action, module and clientinfo from the
cx_Oracle.connect method. The appcontext parameter should be used instead.
- Dropped deprecated attribute numbersAsString from cursor objects. Use an
output type handler instead.
- Dropped deprecated attributes cqqos and rowids from subscription objects.
Use the qos attribute instead.
- Dropped deprecated parameters cqqos and rowids from the
Connection.subscribe() method. Use the qos parameter instead.
--f403045fc05c01370a0556be3fd4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>What is cx_Oracle?</div><div><br></div><div>cx_Oracle=
is a Python extension module that enables access to Oracle Database for Py=
thon 3.x and 2.x and conforms to the Python database API 2.0 specifications=
with a number of enhancements.</div><div><br></div><div><br></div><div>Whe=
re do I get it?</div><div><a href=3D"https://oracle.github.io/python-cx_Ora=
cle" target=3D"_blank">https://oracle.github.io/pytho<wbr>n-cx_Oracle</a></=
div><div><br></div><div>The easiest method to install cx_Oracle 6.0 is via =
pip as in</div><div><br></div><div>=C2=A0 =C2=A0 python -m pip install cx_O=
racle --upgrade</div><div><br></div><div><br></div><div>What's new sinc=
e 5.3?</div><div><br></div><div>This is the first production release of ver=
sion 6.0. The complete release notes can be found here:=C2=A0<a href=3D"htt=
p://cx-oracle.readthedocs.io/en/latest/releasenotes.html#version-6-0-august=
-2017" target=3D"_blank">http://cx-oracle.readthe<wbr>docs.io/en/latest/rel=
easenotes<wbr>.html#version-6-0-august-2017</a>.</div><div><br></div><div>A=
summary of the changes compared to version 5.3 is found below:</div><div><=
br></div><div><b><u>Highlighted Enhancements</u></b></div><div><br></div><d=
iv>- Has been re-implemented to use the new ODPI-C (<a href=3D"https://orac=
le.github.io/odpi" target=3D"_blank">https://oracle.github.io/odpi</a><wbr>=
) abstraction layer for Oracle Database. The cx_Oracle API is unchanged. Th=
e cx_Oracle design, build and linking process has improved because of ODPI-=
C.</div><div><br></div><div>- Now has Python Wheels available for install. =
This is made possible by the ODPI-C architecture. Windows installers and Li=
nux RPMs are no longer produced since PyPI no longer supports them.</div><d=
iv><br></div><div>- Has less code in Python's Global Interpreter Lock, =
giving better scalability.</div><div><div><br></div><div>- Added support fo=
r universal rowids.=C2=A0<br><br>- Added support for DML returning of multi=
ple rows.<br></div><div><br></div><div>- Now associates LOB locators to LOB=
objects so they are not overwritten on database round trips.<br></div></di=
v><div><br></div><div><b><u>Installation Changes</u></b></div><div><div><br=
></div><div>- On Linux, cx_Oracle 6 no longer uses instant client RPMs auto=
matically. You must set LD_LIBRARY_PATH or use ldconfig to locate the Oracl=
e Client library.</div><div><br></div><div>- On platforms other than Window=
s, if ORACLE_HOME is set (in a database or full client installation), remov=
e requirement to set LD_LIBRARY_PATH in order to locate the Oracle Client l=
ibrary (<a class=3D"gmail-m_-9077529093058346402m_-7827412571390462889gmail=
-moz-txt-link-freetext" href=3D"https://github.com/oracle/odpi/issues/20" t=
arget=3D"_blank">https://github.com/oracle/odp<wbr>i/issues/20</a>).</div><=
div><br></div></div><div><b><u>Connection Management Enhancements</u></b></=
div><div><br></div><div>- Prevent closing the connection when there are any=
open statements or LOBs and add new error "DPI-1054: connection canno=
t be closed when open statements or LOBs exist" when this situation is=
detected; this is needed to prevent crashes under certain conditions when =
statements or LOBs are being acted upon while at the same time (in another =
thread) a connection is being closed; it also prevents leaks of statements =
and LOBs when a connection is returned to a session pool.=C2=A0<br></div><d=
iv><br></div><div>- Added attribute SessionPool.stmtcachesize to support ge=
tting and=20
setting the default statement cache size for connections in the pool.=C2=A0=
<br></div><div>
<br>- Added attribute Connection.dbop to support setting the database=20
operation that is to be monitored.
<br>
<br>- Added attribute Connection.handle to facilitate testing the creation=
=20
of a connection using a OCI service context handle.
<br>
<br>- Added parameters tag and matchanytag to the cx_Oracle.connect and=20
SessionPool.acquire methods and added parameters tag and retag to the=20
SessionPool.release method in order to support session tagging.
<br>
<br>- Added parameter edition to the cx_Oracle.SessionPool method.
<br><br>- Added parameters region, sharding_key and super_sharding_key to t=
he cx_Oracle.makedsn() method to support connecting to a sharded database (=
new in Oracle Database 12.2).=C2=A0<br></div><div><div><br></div><div>- Rem=
oved requirement that encoding and nencoding both be specified when creatin=
g a connection or session pool. The missing value is set to its default val=
ue if one of the values is set and the other is not (<a class=3D"gmail-m_-9=
077529093058346402m_-7827412571390462889gmail-moz-txt-link-freetext" href=
=3D"https://github.com/oracle/python-cx_Oracle/issues/36" target=3D"_blank"=
>https://github.com/oracle/pyt<wbr>hon-cx_Oracle/issues/36</a>).=C2=A0</div=
><div><br></div><div><div>=C2=A0- Permit use of both string and unicode for=
Python 2.7 for creating session pools and for changing passwords (<a class=
=3D"gmail-m_-9077529093058346402m_-7827412571390462889gmail-moz-txt-link-fr=
eetext" href=3D"https://github.com/oracle/python-cx_Oracle/issues/23" targe=
t=3D"_blank">https://github.com/oracle/pyt<wbr>hon-cx_Oracle/issues/23</a>)=
.=C2=A0<br></div></div><div><br></div></div><div><b><u>Data Type and Data H=
andling Enhancements</u></b></div><div><br></div><div>- Added attributes Va=
riable.actualElements and Variable.values to variables.=C2=A0<br></div><div=
>
<br>- Added support for smallint and float data types in Oracle objects, as=
=20
requested (<a class=3D"gmail-m_-9077529093058346402m_-7827412571390462889gm=
ail-moz-txt-link-freetext" href=3D"https://github.com/oracle/python-cx_Orac=
le/issues/4" target=3D"_blank">https://github.com/oracle/pyt<wbr>hon-cx_Ora=
cle/issues/4</a>).</div><div><br></div><div>- Added=20
support for getting/setting attributes of objects or element values in=20
collections that contain LOBs, BINARY_FLOAT values, BINARY_DOUBLE values=20
and NCHAR and NVARCHAR2 values. The error message for any types that are=20
not supported has been improved as well.<br><br>- An exception is no longer=
raised when a collection is empty for=20
methods Object.first() and Object.last(). Instead, the value None is=20
returned to be consistent with the methods Object.next() and Object.prev().
<br>
<br>- Removed requirement for specifying a maximum size when fetching LONG=
=20
or LONG raw columns. This also allows CLOB, NCLOB, BLOB and BFILE=20
columns to be fetched as strings or bytes without needing to specify a=20
maximum size. The method Cursor.setoutputsize no longer does anything,=20
since ODPI-C automatically manages buffer sizes of LONG and LONG RAW=20
columns.
<br><br>- Enable temporary LOB caching in order to avoid disk I/O as sugges=
ted=20
(<a class=3D"gmail-m_-9077529093058346402m_-7827412571390462889gmail-moz-tx=
t-link-freetext" href=3D"https://github.com/oracle/odpi/issues/10" target=
=3D"_blank">https://github.com/oracle/odp<wbr>i/issues/10</a>).
<br><br></div><div><b><u>Error Handling Enhancements</u></b></div><div><br>=
</div><div>- Provide improved error message when OCI environment cannot be =
created,=20
such as when the oraaccess.xml file cannot be processed properly.
<br>
<br>- Define exception classes on the connection object in addition to at=
=20
module scope in order to simplify error handling in multi-connection=20
environments, as specified in the Python DB API.
<br><br></div><div><b><u>Test Enhancements</u></b><br></div><div>
<br>- Reworked test suite and samples so that they are independent of each=
=20
other and so that the SQL scripts used to create/drop schemas are easily=20
adjusted to use different schema names, if desired.=C2=A0</div><div><br></d=
iv><div>=C2=A0- Updated DB API test suite stub to support Python 3.=C2=A0<b=
r>
<br><b><u>Removals</u></b><br>
<br>- Dropped deprecated parameter twophase from the cx_Oracle.connect=20
method. Applications should set the Connection.internal_name and=20
Connection.external_name attributes instead to a value appropriate to=20
the application.
<br>
<br>- Dropped deprecated parameters action, module and clientinfo from the=
=20
cx_Oracle.connect method. The appcontext parameter should be used instead.
<br>
<br>- Dropped deprecated attribute numbersAsString from cursor objects. Use=
=20
an output type handler instead.
<br>
<br>- Dropped deprecated attributes cqqos and rowids from subscription=20
objects. Use the qos attribute instead.
<br>
<br>- Dropped deprecated parameters cqqos and rowids from the=20
Connection.subscribe() method. Use the qos parameter instead.
<br>
<br></div></div>
--f403045fc05c01370a0556be3fd4--
--===============4960777593633112241==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
DB-SIG maillist - [email protected]
https://mail.python.org/mailman/listinfo/db-sig
--===============4960777593633112241==--