Skip to content

Commit 44f1f63

Browse files
Docs: sqlite3 docs fixup (#95681)
- Disable links to the module itself - Fix link indent - Consistent ref markup
1 parent b24e8b2 commit 44f1f63

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

Doc/library/sqlite3.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ Module functions and constants
146146
.. data:: paramstyle
147147

148148
String constant stating the type of parameter marker formatting expected by
149-
the :mod:`sqlite3` module. Required by the DB-API. Hard-coded to
149+
the :mod:`!sqlite3` module. Required by the DB-API. Hard-coded to
150150
``"qmark"``.
151151

152152
.. note::
153153

154-
The :mod:`sqlite3` module supports both ``qmark`` and ``numeric`` DB-API
154+
The :mod:`!sqlite3` module supports both ``qmark`` and ``numeric`` DB-API
155155
parameter styles, because that is what the underlying SQLite library
156156
supports. However, the DB-API does not allow multiple values for
157157
the ``paramstyle`` attribute.
@@ -164,7 +164,7 @@ Module functions and constants
164164
.. deprecated-removed:: 3.12 3.14
165165
This constant used to reflect the version number of the ``pysqlite``
166166
package, a third-party library which used to upstream changes to
167-
``sqlite3``. Today, it carries no meaning or practical value.
167+
:mod:`!sqlite3`. Today, it carries no meaning or practical value.
168168

169169

170170
.. data:: version_info
@@ -175,7 +175,7 @@ Module functions and constants
175175
.. deprecated-removed:: 3.12 3.14
176176
This constant used to reflect the version number of the ``pysqlite``
177177
package, a third-party library which used to upstream changes to
178-
``sqlite3``. Today, it carries no meaning or practical value.
178+
:mod:`!sqlite3`. Today, it carries no meaning or practical value.
179179

180180

181181
.. data:: sqlite_version
@@ -192,7 +192,7 @@ Module functions and constants
192192
.. data:: threadsafety
193193

194194
Integer constant required by the DB-API 2.0, stating the level of thread
195-
safety the :mod:`sqlite3` module supports. This attribute is set based on
195+
safety the :mod:`!sqlite3` module supports. This attribute is set based on
196196
the default `threading mode <https://sqlite.org/threadsafe.html>`_ the
197197
underlying SQLite library is compiled with. The SQLite threading modes are:
198198

@@ -233,7 +233,7 @@ Module functions and constants
233233
:func:`connect` to look up a converter function using
234234
the declared types for each column.
235235
The types are declared when the database table is created.
236-
``sqlite3`` will look up a converter function using the first word of the
236+
:mod:`!sqlite3` will look up a converter function using the first word of the
237237
declared type as the converter dictionary key.
238238
For example:
239239

@@ -317,7 +317,7 @@ Module functions and constants
317317
if not the default :class:`Connection` class.
318318

319319
:param int cached_statements:
320-
The number of statements that ``sqlite3``
320+
The number of statements that :mod:`!sqlite3`
321321
should internally cache for this connection, to avoid parsing overhead.
322322
By default, 128 statements.
323323

@@ -365,7 +365,7 @@ Module functions and constants
365365
SQLite type.
366366
The adapter is called with a Python object of type *type* as its sole
367367
argument, and must return a value of a
368-
:ref:`type that SQLite natively understands<sqlite3-types>`.
368+
:ref:`type that SQLite natively understands <sqlite3-types>`.
369369

370370

371371
.. function:: complete_statement(statement)
@@ -431,7 +431,7 @@ Connection objects
431431
.. attribute:: isolation_level
432432

433433
This attribute controls the :ref:`transaction handling
434-
<sqlite3-controlling-transactions>` performed by ``sqlite3``.
434+
<sqlite3-controlling-transactions>` performed by :mod:`!sqlite3`.
435435
If set to ``None``, transactions are never implicitly opened.
436436
If set to one of ``"DEFERRED"``, ``"IMMEDIATE"``, or ``"EXCLUSIVE"``,
437437
corresponding to the underlying `SQLite transaction behaviour`_,
@@ -664,7 +664,7 @@ Connection objects
664664
:const:`SQLITE_OK` if access is allowed, :const:`SQLITE_DENY` if the entire SQL
665665
statement should be aborted with an error and :const:`SQLITE_IGNORE` if the
666666
column should be treated as a NULL value. These constants are available in the
667-
:mod:`sqlite3` module.
667+
:mod:`!sqlite3` module.
668668

669669
The first argument to the callback signifies what kind of operation is to be
670670
authorized. The second and third argument will be arguments or ``None``
@@ -675,7 +675,7 @@ Connection objects
675675

676676
Please consult the SQLite documentation about the possible values for the first
677677
argument and the meaning of the second and third argument depending on the first
678-
one. All necessary constants are available in the :mod:`sqlite3` module.
678+
one. All necessary constants are available in the :mod:`!sqlite3` module.
679679

680680
Passing ``None`` as *authorizer_callback* will disable the authorizer.
681681

@@ -733,7 +733,7 @@ Connection objects
733733

734734
.. note::
735735

736-
The ``sqlite3`` module is not built with loadable extension support by
736+
The :mod:`!sqlite3` module is not built with loadable extension support by
737737
default, because some platforms (notably macOS) have SQLite
738738
libraries which are compiled without this feature.
739739
To get loadable extension support,
@@ -928,7 +928,7 @@ Connection objects
928928

929929
.. versionadded:: 3.11
930930

931-
.. _SQLite limit category: https://www.sqlite.org/c3ref/c_limit_attached.html
931+
.. _SQLite limit category: https://www.sqlite.org/c3ref/c_limit_attached.html
932932

933933

934934
.. method:: serialize(*, name="main")
@@ -1109,11 +1109,11 @@ Cursor objects
11091109

11101110
.. method:: setinputsizes(sizes, /)
11111111

1112-
Required by the DB-API. Does nothing in :mod:`sqlite3`.
1112+
Required by the DB-API. Does nothing in :mod:`!sqlite3`.
11131113

11141114
.. method:: setoutputsize(size, column=None, /)
11151115

1116-
Required by the DB-API. Does nothing in :mod:`sqlite3`.
1116+
Required by the DB-API. Does nothing in :mod:`!sqlite3`.
11171117

11181118
.. attribute:: rowcount
11191119

@@ -1301,8 +1301,8 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).
13011301

13021302
.. exception:: Warning
13031303

1304-
This exception is not currently raised by the ``sqlite3`` module,
1305-
but may be raised by applications using ``sqlite3``,
1304+
This exception is not currently raised by the :mod:`!sqlite3` module,
1305+
but may be raised by applications using :mod:`!sqlite3`,
13061306
for example if a user-defined function truncates data while inserting.
13071307
``Warning`` is a subclass of :exc:`Exception`.
13081308

@@ -1333,7 +1333,7 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).
13331333

13341334
Exception raised for misuse of the low-level SQLite C API.
13351335
In other words, if this exception is raised, it probably indicates a bug in the
1336-
``sqlite3`` module.
1336+
:mod:`!sqlite3` module.
13371337
``InterfaceError`` is a subclass of :exc:`Error`.
13381338

13391339
.. exception:: DatabaseError
@@ -1371,7 +1371,7 @@ The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`).
13711371

13721372
.. exception:: ProgrammingError
13731373

1374-
Exception raised for ``sqlite3`` API programming errors,
1374+
Exception raised for :mod:`!sqlite3` API programming errors,
13751375
for example supplying the wrong number of bindings to a query,
13761376
or trying to operate on a closed :class:`Connection`.
13771377
``ProgrammingError`` is a subclass of :exc:`DatabaseError`.
@@ -1427,10 +1427,10 @@ This is how SQLite types are converted to Python types by default:
14271427
| ``BLOB`` | :class:`bytes` |
14281428
+-------------+----------------------------------------------+
14291429

1430-
The type system of the :mod:`sqlite3` module is extensible in two ways: you can
1430+
The type system of the :mod:`!sqlite3` module is extensible in two ways: you can
14311431
store additional Python types in an SQLite database via
14321432
:ref:`object adapters <sqlite3-adapters>`,
1433-
and you can let the ``sqlite3`` module convert SQLite types to
1433+
and you can let the :mod:`!sqlite3` module convert SQLite types to
14341434
Python types via :ref:`converters <sqlite3-converters>`.
14351435

14361436

@@ -1439,7 +1439,7 @@ Python types via :ref:`converters <sqlite3-converters>`.
14391439
Command-line interface
14401440
^^^^^^^^^^^^^^^^^^^^^^
14411441

1442-
The ``sqlite3`` module can be invoked as a script
1442+
The :mod:`!sqlite3` module can be invoked as a script
14431443
in order to provide a simple SQLite shell.
14441444
Type ``.quit`` or CTRL-D to exit the shell.
14451445

@@ -1498,7 +1498,7 @@ Using adapters to store custom Python types in SQLite databases
14981498

14991499
SQLite supports only a limited set of data types natively.
15001500
To store custom Python types in SQLite databases, *adapt* them to one of the
1501-
:ref:`Python types SQLite natively understands<sqlite3-types>`.
1501+
:ref:`Python types SQLite natively understands <sqlite3-types>`.
15021502

15031503
There are two ways to adapt Python objects to SQLite types:
15041504
letting your object adapt itself, or using an *adapter callable*.
@@ -1562,7 +1562,7 @@ and constructs a :class:`Point` object from it.
15621562
x, y = map(float, s.split(b";"))
15631563
return Point(x, y)
15641564

1565-
We now need to tell ``sqlite3`` when it should convert a given SQLite value.
1565+
We now need to tell :mod:`!sqlite3` when it should convert a given SQLite value.
15661566
This is done when connecting to a database, using the *detect_types* parameter
15671567
of :func:`connect`. There are three options:
15681568

@@ -1679,7 +1679,7 @@ directly using only a single call on the :class:`Connection` object.
16791679
Accessing columns by name instead of by index
16801680
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16811681

1682-
One useful feature of the :mod:`sqlite3` module is the built-in
1682+
One useful feature of the :mod:`!sqlite3` module is the built-in
16831683
:class:`sqlite3.Row` class designed to be used as a row factory.
16841684

16851685
Rows wrapped with this class can be accessed both by index (like tuples) and
@@ -1754,7 +1754,7 @@ Explanation
17541754
Transaction control
17551755
^^^^^^^^^^^^^^^^^^^
17561756

1757-
The ``sqlite3`` module does not adhere to the transaction handling recommended
1757+
The :mod:`!sqlite3` module does not adhere to the transaction handling recommended
17581758
by :pep:`249`.
17591759

17601760
If the connection attribute :attr:`~Connection.isolation_level`
@@ -1765,7 +1765,7 @@ new transactions are implicitly opened before
17651765
Use the :meth:`~Connection.commit` and :meth:`~Connection.rollback` methods
17661766
to respectively commit and roll back pending transactions.
17671767
You can choose the underlying `SQLite transaction behaviour`_ —
1768-
that is, whether and what type of ``BEGIN`` statements ``sqlite3``
1768+
that is, whether and what type of ``BEGIN`` statements :mod:`!sqlite3`
17691769
implicitly executes –
17701770
via the :attr:`~Connection.isolation_level` attribute.
17711771

@@ -1782,7 +1782,7 @@ any pending transaction before execution of the given SQL script,
17821782
regardless of the value of :attr:`~Connection.isolation_level`.
17831783

17841784
.. versionchanged:: 3.6
1785-
:mod:`sqlite3` used to implicitly commit an open transaction before DDL
1785+
:mod:`!sqlite3` used to implicitly commit an open transaction before DDL
17861786
statements. This is no longer the case.
17871787

17881788
.. _autocommit mode:

0 commit comments

Comments
 (0)