Deprecations

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

Table 2 Deprecated in 8.2

Name

Comments

encoding parameter to cx_Oracle.connect()

No longer needed as the use of encodings other than UTF-8 is deprecated. Encoding is handled internally between cx_Oracle and Oracle Database.

nencoding parameter to cx_Oracle.connect()

No longer needed as the use of encodings other than UTF-8 is deprecated.

encoding parameter to cx_Oracle.SessionPool()

No longer needed as the use of encodings other than UTF-8 is deprecated.

nencoding parameter to cx_Oracle.SessionPool()

No longer needed as the use of encodings other than UTF-8 is deprecated.

Connection.maxBytesPerCharacter

No longer needed as the use of encodings other than UTF-8 is deprecated. The constant value 4 can be used instead.

Positional parameters to cx_Oracle.connect()

Replace with keyword parameters in order to comply with the Python database API.

Positional parameters to cx_Oracle.SessionPool()

Replace with keyword parameters in order to comply with the Python database API.

threaded parameter to cx_Oracle.SessionPool()

The value of this parameter is ignored. Threading is now always used.

waitTimeout parameter to cx_Oracle.SessionPool()

Replace with parameter name wait_timeout

maxLifetimeSession parameter to cx_Oracle.SessionPool()

Replace with parameter name max_lifetime_session

sessionCallback parameter to cx_Oracle.SessionPool()

Replace with parameter name session_callback

maxSessionsPerShard parameter to cx_Oracle.SessionPool()

Replace with parameter name max_sessions_per_shard

SessionPool.tnsentry

Replace with SessionPool.dsn

payloadType parameter to Connection.queue()

Replace with parameter name payload_type if using keyword parameters.

ipAddress parameter to Connection.subscribe()

Replace with parameter name ip_address

groupingClass parameter to Connection.subscribe()

Replace with parameter name grouping_class

groupingValue parameter to Connection.subscribe()

Replace with parameter name grouping_value

groupingType parameter to Connection.subscribe()

Replace with parameter name grouping_type

clientInitiated parameter to Connection.subscribe()

Replace with parameter name client_initiated

Connection.callTimeout

Replace with Connection.call_timeout

Connection.tnsentry

Replace with Connection.dsn

keywordParameters parameter to Cursor.callfunc()

Replace with parameter name keyword_parameters

keywordParameters parameter to Cursor.callproc()

Replace with parameter name keyword_parameters

encodingErrors parameter to Cursor.var()

Replace with parameter name encoding_errors

Cursor.fetchraw()

Replace with Cursor.fetchmany()

newSize parameter to LOB.trim()

Replace with parameter name new_size

Queue.deqMany

Replace with Queue.deqmany()

Queue.deqOne

Replace with Queue.deqone()

Queue.enqMany

Replace with Queue.enqmany()

Queue.enqOne

Replace with Queue.enqone()

Queue.deqOptions

Replace with Queue.deqoptions

Queue.enqOptions

Replace with Queue.enqoptions()

Queue.payloadType

Replace with Queue.payload_type()

Subscription.ipAddress

Replace with Subscription.ip_address

Message.consumerName

Replace with Message.consumer_name

Message.queueName

Replace with Message.queue_name

Variable.actualElements

Replace with Variable.actual_elements

Variable.bufferSize

Replace with Variable.buffer_size

Variable.numElements

Replace with Variable.num_elements

Table 3 Deprecated in 8.0

Name

Comments

cx_Oracle.BFILE

Replace with cx_Oracle.DB_TYPE_BFILE

cx_Oracle.BLOB

Replace with cx_Oracle.DB_TYPE_BLOB

cx_Oracle.BOOLEAN

Replace with cx_Oracle.DB_TYPE_BOOLEAN

cx_Oracle.CLOB

Replace with cx_Oracle.DB_TYPE_CLOB

cx_Oracle.CURSOR

Replace with cx_Oracle.DB_TYPE_CURSOR

cx_Oracle.FIXED_CHAR

Replace with cx_Oracle.DB_TYPE_CHAR

cx_Oracle.FIXED_NCHAR

Replace with cx_Oracle.DB_TYPE_NCHAR

cx_Oracle.INTERVAL

Replace with cx_Oracle.DB_TYPE_INTERVAL_DS

cx_Oracle.LONG_BINARY

Replace with cx_Oracle.DB_TYPE_LONG_RAW

cx_Oracle.LONG_STRING

Replace with cx_Oracle.DB_TYPE_LONG

cx_Oracle.NATIVE_FLOAT

Replace with cx_Oracle.DB_TYPE_BINARY_DOUBLE

cx_Oracle.NATIVE_INT

Replace with cx_Oracle.DB_TYPE_BINARY_INTEGER

cx_Oracle.NCHAR

Replace with cx_Oracle.DB_TYPE_NVARCHAR

cx_Oracle.NCLOB

Replace with cx_Oracle.DB_TYPE_NCLOB

cx_Oracle.OBJECT

Replace with cx_Oracle.DB_TYPE_OBJECT

cx_Oracle.TIMESTAMP

Replace with cx_Oracle.DB_TYPE_TIMESTAMP

Table 4 Deprecated in 7.2

Name

Comments

Connection.deq()

Replace with Queue.deqone() or Queue.deqmany().

Connection.deqoptions()

Replace with attribute Queue.deqoptions.

Connection.enq()

Replace with Queue.enqone() or Queue.enqmany().

Connection.enqoptions()

Replace with attribute Queue.enqoptions.

Table 5 Deprecated in 6.4

Name

Comments

Cursor.executemanyprepared()

Replace with executemany() with None for the statement argument and an integer for the parameters argument.