Skip to content

Latest commit

 

History

History
277 lines (251 loc) · 19.5 KB

deprecations.rst

File metadata and controls

277 lines (251 loc) · 19.5 KB

Deprecations

The following tables contain all of the deprecations in the python-oracledb API, when they were first deprecated and a comment on what should be used instead, if applicable. The most recent deprecations are listed first.

Deprecated in python-oracledb 1.0

    • Name
    • Comments
    • Connection.begin()
    • Replace by the new tcp functionality.
    • Connection.prepare()
    • Replace by the new tcp functionality.
    • Parameters encoding and nencoding of the oracledb.connect(), oracledb.create_pool() and oracledb.SessionPool() methods
    • The encodings in use are always UTF-8.
    • Parameter threaded of the oracledb.connect() method
    • This was used to allow the Oracle Client libraries to support threaded applications. This value is ignored in python-oracledb because the threaded OCI is always enabled in the Thick mode, and the option is not relevant to the Thin mode. The equivalent parameter was already deprecated for cx_Oracle.SessionPool() in cx_Oracle 8.2.
    • Attribute Connection.maxBytesPerCharacter of the Connection object
    • This was previously deprecated. In python-oracledb 1.0 it will return a constant value of 4 since encodings are always UTF-8.
    • Size argument, numRows of the Cursor.fetchmany() method
    • Rename the parameter to size.
    • cx_Oracle.makedsn()
    • Pass the connection string components as connection creation, or pool creation, parameters. Or use a ConnectParams Class <connparam> object.
    • oracledb.Connection()
    • This method is no longer recommended for creating connections. Use the equivalent function oracledb.connect() instead.
    • Attribute Cursor.bindarraysize of the Cursor object
    • Remove this attribute since it is no longer needed.
    • Constant ~oracledb.ATTR_PURITY_DEFAULT
    • Replace by ~oracledb.PURITY_DEFAULT.
    • Constant ~oracledb.ATTR_PURITY_NEW
    • Replace by ~oracledb.PURITY_NEW.
    • Constant ~oracledb.ATTR_PURITY_SELF
    • Replace by ~oracledb.PURITY_SELF.
    • Constant ~oracledb.SPOOL_ATTRVAL_WAIT
    • Replace by ~oracledb.POOL_GETMODE_WAIT.
    • Constant ~oracledb.SPOOL_ATTRVAL_NOWAIT
    • Replace by ~oracledb.POOL_GETMODE_NOWAIT.
    • Constant ~oracledb.SPOOL_ATTRVAL_FORCEGET
    • Replace by ~oracledb.POOL_GETMODE_FORCEGET.
    • Constant ~oracledb.SPOOL_ATTRVAL_TIMEDWAIT
    • Replace by ~oracledb.POOL_GETMODE_TIMEDWAIT.
    • Constant ~oracledb.DEFAULT_AUTH
    • Replace by ~oracledb.AUTH_MODE_DEFAULT.
    • Constant ~oracledb.SYSASM
    • Replace by ~oracledb.AUTH_MODE_SYSASM.
    • Constant ~oracledb.SYSBKP
    • Replace by ~oracledb.AUTH_MODE_SYSBKP.
    • Constant ~oracledb.SYSDBA
    • Replace by ~oracledb.AUTH_MODE_SYSDBA.
    • Constant ~oracledb.SYSDGD
    • Replace by ~oracledb.AUTH_MODE_SYSDGD.
    • Constant ~oracledb.SYSKMT
    • Replace by ~oracledb.AUTH_MODE_SYSKMT.
    • Constant ~oracledb.SYSOPER
    • Replace by ~oracledb.AUTH_MODE_SYSOPER.
    • Constant ~oracledb.SYSRAC
    • Replace by ~oracledb.AUTH_MODE_SYSRAC.
    • Constant ~oracledb.PRELIM_AUTH
    • Replace by ~oracledb.AUTH_MODE_PRELIM.
    • Constant ~oracledb.SUBSCR_PROTO_OCI
    • Replace by ~oracledb.SUBSCR_PROTO_CALLBACK.
    • Class name ObjectType
    • Replace by the equivalent DbObjectType<dbobjecttype>.
    • Class name Object
    • Replace by the equivalent DbObject <dbobject>.

Many of the usages deprecated in cx_Oracle (see tables below) are still supported by python-oracledb to ease upgrade from cx_Oracle. However, these previous cx_Oracle deprecation announcements remain in force for python-oracledb. The relevant functionality may be removed in a future version of python-oracledb.

Some of the previous deprecations that have been removed and are not available in python-oracledb are listed below:

  • The previously deprecated function Cursor.fetchraw() has been removed in python-oracledb. Use one of the other fetch methods such as Cursor.fetchmany() instead.
  • The previously deprecated function Cursor.executemanyprepared() has been removed in python-oracledb. Use Cursor.executemany() instead.
  • The previously deprecated function Cursor.rowcount() has been removed in python-oracledb. Use Cursor.executemany() instead.
  • The previously deprecated Advanced Queuing (AQ) API has been removed in python-oracledb. Use the new AQ API instead. AQ is only available in the python-oracledb Thick mode.

Deprecated in cx_Oracle 8.2

Deprecated in cx_Oracle 8.0

Deprecated in cx_Oracle 7.2

Deprecated in cx_Oracle 6.4

    • Name
    • Comments
    • Cursor.executemanyprepared()
    • Replace with ~Cursor.executemany() with None for the statement argument and an integer for the parameters argument.