Skip to content

Commit cd28b18

Browse files
Small tweaks to the links for the oracledb.defaults attributes.
1 parent 054e907 commit cd28b18

File tree

17 files changed

+190
-142
lines changed

17 files changed

+190
-142
lines changed

doc/src/api_manual/connect_params.rst

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ All properties are read only.
139139
.. autoproperty:: ConnectParams.driver_name
140140

141141
This is an arbitrary value set by the user in the
142-
:meth:`oracledb.ConnectParams()` method or the :attr:`defaults.driver_name`
143-
attribute which is the default value. This is the value shown in the
144-
CLIENT_DRIVER column of the V$SESSION_CONNECT_INFO view.
142+
:meth:`oracledb.ConnectParams()` method or the
143+
:attr:`oracledb.defaults.driver_name <Defaults.driver_name>` attribute
144+
which is the default value. This is the value shown in the CLIENT_DRIVER
145+
column of the V$SESSION_CONNECT_INFO view.
145146

146147
This attribute is supported in both python-oracledb Thin and Thick modes.
147148

@@ -193,9 +194,10 @@ All properties are read only.
193194
.. autoproperty:: ConnectParams.machine
194195

195196
This is an arbitrary value set by the user in the
196-
:meth:`oracledb.ConnectParams()` method or the :attr:`defaults.machine`
197-
attribute which is the default value. This is the value shown in the
198-
MACHINE column of the V$SESSION view.
197+
:meth:`oracledb.ConnectParams()` method or the
198+
:attr:`oracledb.defaults.machine <Defaults.machine>` attribute which is the
199+
default value. This is the value shown in the MACHINE column of the
200+
V$SESSION view.
199201

200202
This attribute is only supported in python-oracledb Thin mode.
201203

@@ -210,9 +212,10 @@ All properties are read only.
210212
.. autoproperty:: ConnectParams.osuser
211213

212214
This is an arbitrary value set by the user in the
213-
:meth:`oracledb.ConnectParams()` method or the :attr:`defaults.osuser`
214-
attribute which is the default value. This is the value shown in the OSUSER
215-
column of the V$SESSION view.
215+
:meth:`oracledb.ConnectParams()` method or the
216+
:attr:`oracledb.defaults.osuser <Defaults.osuser>` attribute which is the
217+
default value. This is the value shown in the OSUSER column of the
218+
V$SESSION view.
216219

217220
This attribute is only supported in python-oracledb Thin mode.
218221

@@ -249,9 +252,10 @@ All properties are read only.
249252
.. autoproperty:: ConnectParams.program
250253

251254
This is an arbitrary value set by the user in the
252-
:meth:`oracledb.ConnectParams()` method or the :attr:`defaults.program`
253-
attribute which is the default value. This is the value shown in the
254-
PROGRAM column of the V$SESSION view.
255+
:meth:`oracledb.ConnectParams()` method or the
256+
:attr:`oracledb.defaults.program <Defaults.program>` attribute which is the
257+
default value. This is the value shown in the PROGRAM column of the
258+
V$SESSION view.
255259

256260
This attribute is supported in python-oracledb Thin mode.
257261

@@ -350,23 +354,24 @@ All properties are read only.
350354
The default value of this attribute was changed from *60.0* seconds to
351355
*20.0* seconds.
352356

353-
.. autoproperty:: ConnectParams.use_sni
354-
355-
This attribute is supported in both python-oracledb Thin and Thick modes.
356-
357-
.. versionadded:: 3.0.0
358-
359357
.. autoproperty:: ConnectParams.terminal
360358

361359
This is an arbitrary value set by the user in the
362-
:meth:`oracledb.ConnectParams()` method or the :attr:`defaults.terminal`
363-
attribute which is the default value. This is the value shown in the
364-
TERMINAL column of the V$SESSION view.
360+
:meth:`oracledb.ConnectParams()` method or the
361+
:attr:`oracledb.defaults.terminal <Defaults.terminal>` attribute which is
362+
the default value. This is the value shown in the TERMINAL column of the
363+
V$SESSION view.
365364

366365
This attribute is only supported in python-oracledb Thin mode.
367366

368367
.. versionadded:: 2.5.0
369368

369+
.. autoproperty:: ConnectParams.use_sni
370+
371+
This attribute is supported in both python-oracledb Thin and Thick modes.
372+
373+
.. versionadded:: 3.0.0
374+
370375
.. autoproperty:: ConnectParams.thick_mode_dsn_passthrough
371376

372377
This attribute is only supported in python-oracledb Thick mode.

doc/src/api_manual/defaults.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Defaults Attributes
5050
heuristic.
5151

5252
At completion of a call to :meth:`oracledb.init_oracle_client()` in
53-
Thick mode, the value of :attr:`defaults.config_dir` may get changed
53+
Thick mode, the value of :attr:`Defaults.config_dir` may get changed
5454
by python-oracledb.
5555

5656
.. autoproperty:: Defaults.driver_name

doc/src/api_manual/module.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ Oracledb Methods
199199

200200
.. versionchanged:: 3.0.0
201201

202-
At completion of the method, the value of :attr:`defaults.config_dir`
203-
may get changed by python-oracledb.
202+
At completion of the method, the value of
203+
:attr:`oracledb.defaults.config_dir <Defaults.config_dir>` may get
204+
changed by python-oracledb.
204205

205206
.. versionchanged:: 2.5.0
206207

@@ -1905,7 +1906,8 @@ stored configuration information. Python-oracledb then uses this information to
19051906
connect to Oracle Database.
19061907

19071908
To use this plugin in python-oracledb Thick mode, you must set
1908-
:attr:`defaults.thick_mode_dsn_passthrough` to *False*. Alternatively use
1909+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
1910+
<Defaults.thick_mode_dsn_passthrough>` to *False*. Alternatively use
19091911
:meth:`ConnectParams.parse_connect_string()`, see :ref:`usingconnparams`.
19101912

19111913
See :ref:`ociobjstorageprovider` for more information.
@@ -1930,7 +1932,8 @@ stored configuration information. Python-oracledb then uses this information to
19301932
connect to Oracle Database.
19311933

19321934
To use this plugin in python-oracledb Thick mode, you must set
1933-
:attr:`defaults.thick_mode_dsn_passthrough` to *False*. Alternatively use
1935+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
1936+
<Defaults.thick_mode_dsn_passthrough>` to *False*. Alternatively use
19341937
:meth:`ConnectParams.parse_connect_string()`, see :ref:`usingconnparams`.
19351938

19361939
See :ref:`azureappstorageprovider` for more information.

doc/src/release_notes.rst

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ Common Changes
280280
- Added support for CLOB, BLOB, and RAW data types
281281
- Fixed support for BOOLEAN data type
282282
- Fixed bug when NUMBER data is fetched that does not have a precision or
283-
scale specified and :attr:`defaults.fetch_decimals` is set to *True*.
283+
scale specified and
284+
:attr:`oracledb.defaults.fetch_decimals <Defaults.fetch_decimals>` is set
285+
to *True*.
284286
- More efficient processing when a significant amount of data is duplicated
285287
from one row to the next
286288
- Avoid memory allocation/free cycles for decimal data
@@ -298,7 +300,8 @@ Common Changes
298300
#) An error message that links to :ref:`documentation <ldapconnections>` on
299301
setting up a protocol hook function is now returned by default for LDAP and
300302
LDAPS URL connection strings in python-oracledb Thin mode, or when
301-
:attr:`defaults.thick_mode_dsn_passthrough` is *False*.
303+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
304+
<Defaults.thick_mode_dsn_passthrough>` is *False*.
302305
#) Error ``DPY-2062: payload cannot be enqueued since it does not match the
303306
payload type supported by the queue`` is now raised when the payload of a
304307
message being enqueued is not supported by the queue. Previously,
@@ -379,14 +382,16 @@ Thick Mode Changes
379382
++++++++++++++++++
380383

381384
#) At successful completion of a call to :meth:`oracledb.init_oracle_client()`,
382-
the value of :attr:`defaults.config_dir` may get set by python-oracledb in
383-
some cases. For example it might be set to the configuration directory that
384-
is relative to the loaded Oracle Client libraries.
385+
the value of :attr:`oracledb.defaults.config_dir <Defaults.config_dir>` may
386+
get set by python-oracledb in some cases. For example it might be set to
387+
the configuration directory that is relative to the loaded Oracle Client
388+
libraries.
385389
#) Connect string parsing and :ref:`tnsnames.ora <optnetfiles>` file handling
386390
can be configured with the new parameter
387-
:attr:`defaults.thick_mode_dsn_passthrough` which can be helpful for
388-
application portability. When it is `False`, python-oracledb Thick mode
389-
behaves similarly to Thin mode.
391+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
392+
<Defaults.thick_mode_dsn_passthrough>` which can be helpful for application
393+
portability. When it is `False`, python-oracledb Thick mode behaves
394+
similarly to Thin mode.
390395
#) Fixed bug that caused :attr:`oracledb._Error.isrecoverable` to always be
391396
`False`.
392397

@@ -428,9 +433,9 @@ Common Changes
428433
:attr:`DbObjectAttribute.scale`, and :attr:`DbObjectAttribute.max_size` that
429434
provide additional metadata about
430435
:ref:`database object attributes <dbobjectattr>`.
431-
#) The attribute :attr:`defaults.config_dir` is now set to
432-
``$ORACLE_HOME/network/admin`` if the environment variable ``ORACLE_HOME``
433-
is set and ``TNS_ADMIN`` is *not* set.
436+
#) The attribute :attr:`oracledb.defaults.config_dir <Defaults.config_dir>` is
437+
now set to ``$ORACLE_HOME/network/admin`` if the environment variable
438+
``ORACLE_HOME`` is set and ``TNS_ADMIN`` is *not* set.
434439
#) All connect strings are parsed by the driver if the new parameter
435440
``thick_mode_dsn_passthrough`` is set to *True*. Previously, only Thin
436441
mode parsed all connect strings and Thick mode passed the connect string
@@ -451,8 +456,9 @@ Common Changes
451456
:meth:`oracledb.connect_async()`, :meth:`oracledb.create_pool()` and
452457
:meth:`oracledb.create_pool_async()`
453458
(`issue 438 <https://github.com/oracle/python-oracledb/issues/438>`__).
454-
#) Fix typing issues with setters for :attr:`defaults.fetch_lobs` and
455-
:attr:`defaults.fetch_decimals`
459+
#) Fix typing issues with setters for
460+
:attr:`oracledb.defaults.fetch_lobs <Defaults.fetch_lobs>` and
461+
:attr:`oracledb.defaults.fetch_decimals <Defaults.fetch_decimals>`
456462
(`issue 458 <https://github.com/oracle/python-oracledb/issues/458>`__).
457463
#) Error ``DPY-2053: python-oracledb thin mode cannot be used because thick
458464
mode has already been enabled`` is now raised when attempting to use
@@ -520,11 +526,11 @@ Thin Mode Changes
520526
:attr:`Connection.serial_num` that provide information about the session
521527
identifier and session serial number associated with a connection.
522528
#) Added attributes
523-
:attr:`oracledb.defaults.driver_name <defaults.driver_name>`,
524-
:attr:`oracledb.defaults.machine <defaults.machine>`,
525-
:attr:`oracledb.defaults.osuser <defaults.osuser>`,
526-
:attr:`oracledb.defaults.program <defaults.program>`, and
527-
:attr:`oracledb.defaults.terminal <defaults.terminal>` to set
529+
:attr:`oracledb.defaults.driver_name <Defaults.driver_name>`,
530+
:attr:`oracledb.defaults.machine <Defaults.machine>`,
531+
:attr:`oracledb.defaults.osuser <Defaults.osuser>`,
532+
:attr:`oracledb.defaults.program <Defaults.program>`, and
533+
:attr:`oracledb.defaults.terminal <Defaults.terminal>` to set
528534
information about the driver name, machine name, operating system user,
529535
program name, and terminal name respectively. The ``driver_name``,
530536
``machine``, ``osuser``, ``program``, and ``terminal`` parameters were also
@@ -1677,7 +1683,8 @@ Thin Mode Changes
16771683
#) Fixed bug with handling of redirect data returned by some SCAN listeners
16781684
(`issue 39 <https://github.com/oracle/python-oracledb/issues/39>`__).
16791685
#) Fixed bug with re-execution of SQL that requires a define, such as occurs
1680-
when setting `oracledb.defaults.fetch_lobs` to the value `False`
1686+
when setting :attr:`oracledb.defaults.fetch_lobs <Defaults.fetch_lobs>` to
1687+
the value `False`
16811688
(`issue 41 <https://github.com/oracle/python-oracledb/issues/41>`__).
16821689
#) Fixed bug that prevented cursors from implicit results sets from being
16831690
closed.

doc/src/user_guide/appendix_c.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ need to be made in addition to the common :ref:`commonupgrade`:
349349
python-oracledb Thick mode.
350350

351351
2. If the ``config_dir`` parameter of :func:`~oracledb.init_oracle_client` had
352-
been used, then set the new :attr:`defaults.config_dir` attribute to the
352+
been used, then set the new
353+
:attr:`oracledb.defaults.config_dir <Defaults.config_dir>` attribute to the
353354
desired value or set the ``config_dir`` parameter in your connection or pool
354355
creation method call. For example:
355356

@@ -368,8 +369,9 @@ need to be made in addition to the common :ref:`commonupgrade`:
368369
Also, see :ref:`sqlnetclientconfig`.
369370

370371
3. If the ``driver_name`` parameter of :func:`~oracledb.init_oracle_client` had
371-
been used, then set the new :attr:`defaults.driver_name` attribute to the
372-
desired value or set the ``driver_name`` parameter when connecting. The
372+
been used, then set the new
373+
:attr:`oracledb.defaults.driver_name <Defaults.driver_name>` attribute to
374+
the desired value or set the ``driver_name`` parameter when connecting. The
373375
convention for this parameter is to separate the product name from the
374376
product version by a colon and single blank characters. For example:
375377

@@ -390,7 +392,8 @@ need to be made in addition to the common :ref:`commonupgrade`:
390392
5. To connect using a :ref:`TNS Alias <netservice>` from a ``tnsnames.ora``
391393
file (see :ref:`optnetfiles`) in python-oracledb Thin mode, you should
392394
explicitly set the environment variable ``TNS_ADMIN`` to the directory
393-
containing the file, or set :attr:`defaults.config_dir`, or set the
395+
containing the file, or set
396+
:attr:`oracledb.defaults.config_dir <Defaults.config_dir>`, or set the
394397
``config_dir`` parameter when connecting.
395398

396399
A ``tnsnames.ora`` file in a "default" location such as the Instant Client

doc/src/user_guide/asyncio.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ To limit the time for a pipeline, use an `asyncio timeout
445445
from Python 3.11.
446446

447447
To tune fetching of rows with :meth:`Pipeline.add_fetchall()`, set
448-
:attr:`defaults.arraysize` or pass the ``arraysize`` parameter.
448+
:attr:`oracledb.defaults.arraysize <Defaults.arraysize>` or pass the
449+
``arraysize`` parameter.
449450

450451
Pipelining Examples
451452
+++++++++++++++++++

doc/src/user_guide/connection_handling.rst

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -480,11 +480,13 @@ In python-oracledb Thin mode, an additional :ref:`connection protocol hook
480480
function <registerprotocolhook>` is required to handle this connection
481481
protocol, see :ref:`ldapconnections`. A connection protocol hook function is
482482
also required in python-oracledb Thick mode if
483-
:attr:`defaults.thick_mode_dsn_passthrough` is *False*.
483+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
484+
<Defaults.thick_mode_dsn_passthrough>` is *False*.
484485

485486
To use LDAP URLs in python-oracledb Thick mode applications when
486-
:attr:`defaults.thick_mode_dsn_passthrough` is *True*, the Oracle Client
487-
libraries must be 23.4, or later.
487+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
488+
<Defaults.thick_mode_dsn_passthrough>` is *True*, the Oracle Client libraries
489+
must be 23.4, or later.
488490

489491

490492
.. _configproviderurl:
@@ -631,11 +633,13 @@ you in python-oracledb, then you can alter the connection string to include a
631633
protocol such as ``tcp://hostname``, or a port number such as
632634
``hostname:1521``.
633635

634-
In python-oracledb Thick mode, when :attr:`defaults.thick_mode_dsn_passthrough`
635-
is *False*, any ``DESCRIPTION``, ``CONNECT_DATA`` and ``SECURITY`` parameters
636-
of a full connect descriptor that are unrecognized by python-oracledb are
637-
passed to the database unchanged. Any Easy Connect parameters that are not
638-
known to python-oracledb are discarded and not passed to the database.
636+
In python-oracledb Thick mode, when
637+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
638+
<Defaults.thick_mode_dsn_passthrough>` is *False*, any ``DESCRIPTION``,
639+
``CONNECT_DATA`` and ``SECURITY`` parameters of a full connect descriptor that
640+
are unrecognized by python-oracledb are passed to the database unchanged. Any
641+
Easy Connect parameters that are not known to python-oracledb are discarded and
642+
not passed to the database.
639643

640644
.. _pyoparams:
641645

@@ -922,16 +926,17 @@ The following configuration providers are supported by python-oracledb:
922926

923927
To use python-oracledb :ref:`Centralized Configuration Provider
924928
<configurationproviders>` functionality in Thick mode, you should set
925-
:attr:`defaults.thick_mode_dsn_passthrough` to *False*. Alternatively use
929+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
930+
<Defaults.thick_mode_dsn_passthrough>` to *False*. Alternatively use
926931
:meth:`ConnectParams.parse_connect_string()`, see :ref:`usingconnparams`.
927932

928-
Note: In Thick mode, when :attr:`defaults.thick_mode_dsn_passthrough` is
929-
*True*, it is the Oracle Client libraries that access the configuration
930-
provider when python-oracledb connection or pool creation methods are
931-
invoked. Any python-oracledb parameter section will be ignored. Any Oracle
932-
Client Interface parameter section should be *removed* from the configuration
933-
because its values may be different to those that python-oracledb assumes, and
934-
will cause undefined behavior.
933+
Note: In Thick mode, when :attr:`oracledb.defaults.thick_mode_dsn_passthrough
934+
<Defaults.thick_mode_dsn_passthrough>` is *True*, it is the Oracle Client
935+
libraries that access the configuration provider when python-oracledb
936+
connection or pool creation methods are invoked. Any python-oracledb parameter
937+
section will be ignored. Any Oracle Client Interface parameter section should
938+
be *removed* from the configuration because its values may be different to
939+
those that python-oracledb assumes, and will cause undefined behavior.
935940

936941
**Precedence of Attributes**
937942

@@ -1036,11 +1041,20 @@ The elements of the ``dsn`` parameter are detailed in the table below.
10361041
* - Parameter
10371042
- Description
10381043
* - ``config-file``
1039-
- Indicates that the centralized configuration provider is a file in your local system.
1044+
- Indicates that the centralized configuration provider is a file in your
1045+
local system.
10401046
* - <file-name>
1041-
- The file path and name of the JSON file that contains the configuration information. For relative paths, python-oracledb will use the connection or pool creation ``config_dir`` parameter, or :attr:`defaults.config_dir` value, to create an absolute path.
1047+
- The file path and name of the JSON file that contains the configuration
1048+
information. For relative paths, python-oracledb will use the
1049+
connection or pool creation ``config_dir`` parameter, or
1050+
:attr:`oracledb.defaults.config_dir <Defaults.config_dir>` value, to
1051+
create an absolute path.
10421052
* - ``key``
1043-
- The connection key name used to identify a specific configuration. If this parameter is specified, the file is assumed to contain multiple configurations that are indexed by the key value. If not specified, the file is assumed to contain a single configuration. See the example further below.
1053+
- The connection key name used to identify a specific configuration. If
1054+
this parameter is specified, the file is assumed to contain multiple
1055+
configurations that are indexed by the key value. If not specified, the
1056+
file is assumed to contain a single configuration. See the example
1057+
further below.
10441058

10451059
**File Configuration Provider Examples**
10461060

@@ -1696,9 +1710,9 @@ hook function is expected to construct valid connection details, which
16961710
python-oracledb will use to complete the connection or pool creation.
16971711

16981712
You can also make use of a protocol hook function in python-oracledb Thick mode
1699-
connection calls by setting :attr:`defaults.thick_mode_dsn_passthrough` to
1700-
*False*. Alternatively use :meth:`ConnectParams.parse_connect_string()`, see
1701-
:ref:`usingconnparams`.
1713+
connection calls by setting :attr:`oracledb.defaults.thick_mode_dsn_passthrough
1714+
<Defaults.thick_mode_dsn_passthrough>` to *False*. Alternatively use
1715+
:meth:`ConnectParams.parse_connect_string()`, see :ref:`usingconnparams`.
17021716

17031717
For example, the following hook function handles connection strings prefixed
17041718
with the ``tcp://`` protocol. When :func:`oracledb.connect()` is called, the
@@ -1932,9 +1946,10 @@ connect with an LDAP URL. For example:
19321946
connection = oracledb.connect(user="scott", password=pw, dsn=ldapurl)
19331947
19341948
To use an LDAP URL in python-oracledb Thick mode when
1935-
:attr:`defaults.thick_mode_dsn_passthrough` is *False*, a connection hook
1936-
function is required as shown below for Thin mode. This lets LDAP URLs be
1937-
utilized when python-oracledb uses any supported Oracle Client library version.
1949+
:attr:`oracledb.defaults.thick_mode_dsn_passthrough
1950+
<Defaults.thick_mode_dsn_passthrough>` is *False*, a connection hook function
1951+
is required as shown below for Thin mode. This lets LDAP URLs be utilized when
1952+
python-oracledb uses any supported Oracle Client library version.
19381953

19391954
**Python-oracledb Thin Mode LDAP URLs**
19401955

0 commit comments

Comments
 (0)