Skip to content

Commit afddb4c

Browse files
Desupported items for version 2.0.
1 parent 463f9ad commit afddb4c

16 files changed

+44
-290
lines changed

doc/src/api_manual/connection.rst

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -670,18 +670,6 @@ Connection Attributes
670670

671671
This attribute is an extension to the DB API definition.
672672

673-
.. attribute:: Connection.encoding
674-
675-
This read-only attribute returns the IANA character set name of the
676-
character set in use by the Oracle client for regular strings. The
677-
encodings in use are always UTF-8.
678-
679-
.. deprecated:: cx_Oracle 8.2
680-
681-
.. note::
682-
683-
This attribute is an extension to the DB API definition.
684-
685673
.. attribute:: Connection.external_name
686674

687675
This read-write attribute specifies the external name that is used by the
@@ -753,21 +741,6 @@ Connection Attributes
753741
server and the client.
754742
755743
756-
.. attribute:: Connection.maxBytesPerCharacter
757-
758-
This deprecated, read-only attribute returns the value 4 since encodings
759-
are always UTF-8.
760-
761-
Previously it returned the maximum number of bytes each character can use
762-
for the client character set.
763-
764-
.. deprecated:: cx_Oracle 8.2
765-
766-
.. note::
767-
768-
This attribute is an extension to the DB API definition.
769-
770-
771744
.. attribute:: Connection.max_open_cursors
772745

773746
This read-only attribute specifies the maximum number of cursors that the
@@ -791,16 +764,6 @@ Connection Attributes
791764
792765
This attribute is an extension to the DB API definition.
793766
794-
.. attribute:: Connection.nencoding
795-
796-
This read-only attribute returns the IANA character set name of the
797-
national character set in use by the Oracle client. This is always the value "UTF-8".
798-
799-
.. deprecated:: cx_Oracle 8.2
800-
801-
.. note::
802-
803-
This attribute is an extension to the DB API definition.
804767
805768
.. attribute:: Connection.outputtypehandler
806769

@@ -886,19 +849,6 @@ Connection Attributes
886849

887850
This attribute is an extension to the DB API definition.
888851

889-
.. attribute:: Connection.tnsentry
890-
891-
This read-only attribute returns the TNS entry of the database to which a
892-
connection has been established.
893-
894-
.. deprecated:: cx_Oracle 8.2
895-
896-
Use the attribute :attr:`~Connection.dsn` instead.
897-
898-
.. note::
899-
900-
This attribute is an extension to the DB API definition.
901-
902852
.. attribute:: Connection.transaction_in_progress
903853

904854
This read-only attribute specifies whether a transaction is currently in

doc/src/api_manual/connection_pool.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,6 @@ ConnectionPool Attributes
307307
terminated. Note that in python-oracledb Thick mode with older Oracle
308308
Client Libraries, the termination only occurs when the pool is accessed.
309309

310-
.. attribute:: ConnectionPool.tnsentry
311-
312-
This read-only attribute returns the TNS entry of the database to which a
313-
connection has been established.
314-
315-
.. deprecated:: cx_Oracle 8.2
316-
317-
Use the attribute :attr:`~ConnectionPool.dsn` instead.
318-
319310

320311
.. attribute:: ConnectionPool.username
321312

doc/src/api_manual/deprecations.rst

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,43 @@ if applicable. The most recent deprecations are listed first.
1111
.. list-table-with-summary:: Desupported in python-oracledb 2.0
1212
:header-rows: 1
1313
:class: wy-table-responsive
14-
:summary: The first column, Name, displays the deprecated or desupported API name. The second column, Comments, includes information about when the API was deprecated or desupported and what API to use, if applicable.
15-
:name: _deprecations_2_0
14+
:summary: The first column, Name, displays the desupported API name. The second column, Comments, includes information about when the API desupported and what API to use, if applicable.
15+
:name: _desupported_2_0
1616

1717
* - Name
1818
- Comments
1919
* - ``oracledb.__future__.old_json_col_as_obj``
20-
- This attribute is desupported and does not need to be set to fetch VARCHAR2 and LOB columns that contain JSON data.
20+
- VARCHAR2 and LOB columns created with the ``IS JSON`` check constraint
21+
are now always fetched as JSON. Use an :ref:`output type handler
22+
<outputtypehandlers>` if the old behavior is required.
23+
* - Parameters ``encoding`` and ``nencoding`` of :func:`oracledb.connect()`
24+
and :func:`oracledb.create_pool()`, and the related attributes on the
25+
objects created
26+
- The driver encodings are always UTF-8. Remove uses of ``encoding`` and
27+
``nencoding`` from your code.
28+
* - Parameter ``threaded`` of :func:`oracledb.connect()` and
29+
:func:`oracledb.create_pool()`
30+
- Threading is always used. Remove uses of ``threaded`` from your code.
31+
* - Parameter ``waitTimeout`` of :func:`oracledb.create_pool()` and
32+
``oracledb.SessionPool()``
33+
- Replace with parameter ``wait_timeout``
34+
* - Parameter ``maxLifetimeSession`` of :func:`oracledb.create_pool()` and
35+
``oracledb.SessionPool()``
36+
- Replace with parameter ``max_lifetime_session``
37+
* - Parameter ``sessionCallback`` of :func:`oracledb.create_pool()` and
38+
``oracledb.SessionPool()``
39+
- Replace with parameter ``session_callback``
40+
* - Parameter ``maxSessionsPerShard`` of :func:`oracledb.create_pool()` and
41+
``oracledb.SessionPool()``
42+
- Replace with parameter ``max_sessions_per_shard``
43+
* - Attribute ``maxBytesPerCharacter`` of the :ref:`connection object
44+
<connobj>`
45+
- The driver encodings are always UTF-8 so this attribute can be replaced by
46+
the constant value 4
47+
* - ``Connection.tnsentry``
48+
- Replace with :attr:`Connection.dsn`
49+
* - ``SessionPool.tnsentry``
50+
- Replace with :attr:`ConnectionPool.dsn`
2151

2252
.. list-table-with-summary:: Deprecated in python-oracledb 1.4
2353
:header-rows: 1
@@ -173,7 +203,7 @@ python-oracledb are listed below:
173203
* - ``maxSessionsPerShard`` parameter to `cx_Oracle.SessionPool() <https://cx-oracle.readthedocs.io/en/latest/api_manual/module.html#cx_Oracle.SessionPool>`_
174204
- Replace with parameter name ``max_sessions_per_shard``
175205
* - ``SessionPool.tnsentry``
176-
- Replace with `SessionPool.dsn <https://cx-oracle.readthedocs.io/en/latest/api_manual/session_pool.html#SessionPool.dsn>`_
206+
- Replace with :attr:`ConnectionPool.dsn`
177207
* - ``payloadType`` parameter to `Connection.queue() <https://cx-oracle.readthedocs.io/en/latest/api_manual/connection.html#Connection.queue>`_
178208
- Replace with parameter name ``payload_type`` if using keyword parameters.
179209
* - ``ipAddress`` parameter to `Connection.subscribe() <https://cx-oracle.readthedocs.io/en/latest/api_manual/connection.html#Connection.subscribe>`_
@@ -189,7 +219,7 @@ python-oracledb are listed below:
189219
* - ``Connection.callTimeout``
190220
- Replace with `Connection.call_timeout <https://cx-oracle.readthedocs.io/en/latest/api_manual/connection.html#Connection.call_timeout>`_
191221
* - ``Connection.tnsentry``
192-
- Replace with `Connection.dsn <https://cx-oracle.readthedocs.io/en/latest/api_manual/connection.html#Connection.dsn>`_
222+
- Replace with :attr:`Connection.dsn`
193223
* - `keywordParameters` parameter to `Cursor.callfunc() <https://cx-oracle.readthedocs.io/en/latest/api_manual/cursor.html#Cursor.callfunc>`_
194224
- Replace with parameter name ``keyword_parameters``
195225
* - ``keywordParameters`` parameter to `Cursor.callproc() <https://cx-oracle.readthedocs.io/en/latest/api_manual/cursor.html#Cursor.callproc>`_

doc/src/api_manual/module.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,11 +1409,6 @@ General
14091409
resource without wrapping it using a mutex semaphore to implement resource
14101410
locking.
14111411

1412-
Note that in order to make use of multiple threads in a program which
1413-
intends to connect and disconnect in different threads, the ``threaded``
1414-
parameter to :meth:`connect()` must be True.
1415-
1416-
14171412
.. data:: version
14181413
.. data:: __version__
14191414

doc/src/release_notes.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,8 @@ Common Changes
5050
++++++++++++++
5151

5252
#) Dropped support for Python 3.6.
53-
#) The attribute ``oracledb.__future__.old_json_col_as_obj`` no longer needs to
54-
be set to fetch JSON data from VARCHAR2 and LOB columns (which have the "IS
55-
JSON" constraint) as objects, similar to fetching Oracle Database 21c JSON
56-
columns. An :ref:`output type handler <outputtypehandlers>` can be used if
57-
the previous default behavior of fetching as VARCHAR2 or LOB is desired.
53+
#) Desupported a number of parameters and attributes that were previously
54+
deprecated. See :ref:`desupport notices<_desupported_2_0>` for details.
5855
#) Added property :attr:`Cursor.warning` for database warnings (such as PL/SQL
5956
compilation warnings) generated by calls to :meth:`Cursor.execute()` or
6057
:meth:`Cursor.executemany()`.

doc/src/user_guide/appendix_c.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ from cx_Oracle:
8989
can be used to encapsulate connection properties. See :ref:`usingconnparams`
9090
for more information.
9191

92-
- The following parameters are deprecated and ignored:
92+
- The following parameters are desupported:
9393

9494
- ``encoding`` and ``nencoding``: The encodings in use are always UTF-8.
9595

src/oracledb/connect_params.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ def __init__(
9595
ssl_context: Any = None,
9696
sdu: int = 8192,
9797
handle: int = 0,
98-
threaded: bool = True,
99-
encoding: str = None,
100-
nencoding: str = None,
10198
):
10299
"""
103100
All parameters are optional. A brief description of each parameter
@@ -723,9 +720,6 @@ def set(
723720
ssl_context: Any = None,
724721
sdu: int = None,
725722
handle: int = None,
726-
threaded: bool = None,
727-
encoding: str = None,
728-
nencoding: str = None,
729723
):
730724
"""
731725
All parameters are optional. A brief description of each parameter

src/oracledb/connection.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,6 @@ def edition(self) -> str:
235235
self._verify_connected()
236236
return self._impl.get_edition()
237237

238-
@property
239-
def encoding(self) -> str:
240-
"""
241-
Specifies the IANA character set name of the character set in use. This
242-
is always the value "UTF-8".
243-
"""
244-
return "UTF-8"
245-
246238
@property
247239
def external_name(self) -> str:
248240
"""
@@ -718,14 +710,6 @@ def msgproperties(
718710
props.recipients = recipients
719711
return props
720712

721-
@property
722-
def nencoding(self) -> str:
723-
"""
724-
Specifies the IANA character set name of the national character set in
725-
use. This is always the value "UTF-8".
726-
"""
727-
return "UTF-8"
728-
729713
def ping(self) -> None:
730714
"""
731715
Pings the database to verify the connection is valid.
@@ -995,13 +979,6 @@ def thin(self) -> bool:
995979
self._verify_connected()
996980
return isinstance(self._impl, thin_impl.ThinConnImpl)
997981

998-
@property
999-
def tnsentry(self) -> str:
1000-
"""
1001-
Deprecated. Use dsn property instead.
1002-
"""
1003-
return self.dsn
1004-
1005982
def tpc_begin(
1006983
self, xid: Xid, flags: int = constants.TPC_BEGIN_NEW, timeout: int = 0
1007984
) -> None:
@@ -1193,9 +1170,6 @@ def connect(
11931170
ssl_context: Any = None,
11941171
sdu: int = 8192,
11951172
handle: int = 0,
1196-
threaded: bool = True,
1197-
encoding: str = None,
1198-
nencoding: str = None,
11991173
) -> Connection:
12001174
"""
12011175
Factory function which creates a connection to the database and returns it.
@@ -1756,9 +1730,6 @@ def connect_async(
17561730
ssl_context: Any = None,
17571731
sdu: int = 8192,
17581732
handle: int = 0,
1759-
threaded: bool = True,
1760-
encoding: str = None,
1761-
nencoding: str = None,
17621733
) -> Connection:
17631734
"""
17641735
Factory function which creates a connection to the database and returns it.

src/oracledb/impl/base/pool_params.pyx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,12 @@ cdef class PoolParamsImpl(ConnectParamsImpl):
8282
_set_uint_param(args, "getmode", &self.getmode)
8383
_set_bool_param(args, "homogeneous", &self.homogeneous)
8484
_set_uint_param(args, "timeout", &self.timeout)
85-
_set_uint_param_with_deprecated_name(args, "wait_timeout",
86-
"waitTimeout", &self.wait_timeout)
87-
_set_uint_param_with_deprecated_name(args, "max_lifetime_session",
88-
"maxLifetimeSession",
89-
&self.max_lifetime_session)
90-
_set_obj_param_with_deprecated_name(args, "session_callback",
91-
"sessionCallback", self)
92-
_set_uint_param_with_deprecated_name(args, "max_sessions_per_shard",
93-
"maxSessionsPerShard",
94-
&self.max_sessions_per_shard)
85+
_set_uint_param(args, "wait_timeout", &self.wait_timeout)
86+
_set_uint_param(args, "max_lifetime_session",
87+
&self.max_lifetime_session)
88+
self.session_callback = args.get("session_callback")
89+
_set_uint_param(args, "max_sessions_per_shard",
90+
&self.max_sessions_per_shard)
9591
_set_bool_param(args, "soda_metadata_cache", &self.soda_metadata_cache)
9692
_set_int_param(args, "ping_interval", &self.ping_interval)
9793

src/oracledb/impl/base/utils.pyx

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -91,41 +91,6 @@ cdef int _set_uint_param(dict args, str name, uint32_t* out_val) except -1:
9191
out_val[0] = int(in_val)
9292

9393

94-
cdef int _set_uint_param_with_deprecated_name(dict args, str name,
95-
str deprecated_name,
96-
uint32_t* out_val) except -1:
97-
"""
98-
Similar to _set_uint_param() but also checks to see if the deprecated
99-
parameter name has been used.
100-
"""
101-
in_val = args.get(name)
102-
deprecated_val = args.get(deprecated_name)
103-
if in_val is not None and deprecated_val is not None:
104-
errors._raise_err(errors.ERR_DUPLICATED_PARAMETER,
105-
deprecated_name=deprecated_name, new_name=name)
106-
elif in_val is not None:
107-
out_val[0] = int(in_val)
108-
elif deprecated_val is not None:
109-
out_val[0] = int(deprecated_val)
110-
111-
cdef int _set_obj_param_with_deprecated_name(dict args, str name,
112-
str deprecated_name,
113-
object target) except -1:
114-
"""
115-
Sets an object parameter to the value provided in the dictionary. If a
116-
value is specified it is set directly on the target.
117-
"""
118-
in_val = args.get(name)
119-
deprecated_val = args.get(deprecated_name)
120-
if in_val is not None and deprecated_val is not None:
121-
errors._raise_err(errors.ERR_DUPLICATED_PARAMETER,
122-
deprecated_name=deprecated_name, new_name=name)
123-
elif in_val is not None:
124-
setattr(target, name, in_val)
125-
elif deprecated_val is not None:
126-
setattr(target, name, deprecated_val)
127-
128-
12994
cdef int _set_protocol_param(dict args, str name, object target) except -1:
13095
"""
13196
Sets a protocol parameter to the value provided in the dictionary. This

src/oracledb/pool.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -635,13 +635,6 @@ def create_pool(
635635
ssl_context: Any = None,
636636
sdu: int = 8192,
637637
handle: int = 0,
638-
threaded: bool = True,
639-
encoding: str = None,
640-
nencoding: str = None,
641-
waitTimeout: int = None,
642-
maxLifetimeSession: int = None,
643-
maxSessionsPerShard: int = None,
644-
sessionCallback: Callable = None,
645638
) -> ConnectionPool:
646639
"""
647640
Creates a connection pool with the supplied parameters and returns it.
@@ -1037,13 +1030,6 @@ def create_pool_async(
10371030
ssl_context: Any = None,
10381031
sdu: int = 8192,
10391032
handle: int = 0,
1040-
threaded: bool = True,
1041-
encoding: str = None,
1042-
nencoding: str = None,
1043-
waitTimeout: int = None,
1044-
maxLifetimeSession: int = None,
1045-
maxSessionsPerShard: int = None,
1046-
sessionCallback: Callable = None,
10471033
) -> AsyncConnectionPool:
10481034
"""
10491035
Creates a connection pool with the supplied parameters and returns it.

src/oracledb/pool_params.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ def __init__(
107107
ssl_context: Any = None,
108108
sdu: int = 8192,
109109
handle: int = 0,
110-
threaded: bool = True,
111-
encoding: str = None,
112-
nencoding: str = None,
113-
waitTimeout: int = None,
114-
maxLifetimeSession: int = None,
115-
maxSessionsPerShard: int = None,
116-
sessionCallback: Callable = None,
117110
):
118111
"""
119112
All parameters are optional. A brief description of each parameter
@@ -561,13 +554,6 @@ def set(
561554
ssl_context: Any = None,
562555
sdu: int = None,
563556
handle: int = None,
564-
threaded: bool = None,
565-
encoding: str = None,
566-
nencoding: str = None,
567-
waitTimeout: int = None,
568-
maxLifetimeSession: int = None,
569-
maxSessionsPerShard: int = None,
570-
sessionCallback: Callable = None,
571557
):
572558
"""
573559
All parameters are optional. A brief description of each parameter

0 commit comments

Comments
 (0)