@@ -1526,6 +1526,41 @@ and you can let the :mod:`!sqlite3` module convert SQLite types to
1526
1526
Python types via :ref: `converters <sqlite3-converters >`.
1527
1527
1528
1528
1529
+ .. _sqlite3-default-converters :
1530
+
1531
+ Default adapters and converters (deprecated)
1532
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1533
+
1534
+ .. note ::
1535
+
1536
+ The default adapters and converters are deprecated as of Python 3.12.
1537
+ Instead, use the :ref: `sqlite3-adapter-converter-recipes `
1538
+ and tailor them to your needs.
1539
+
1540
+ The deprecated default adapters and converters consist of:
1541
+
1542
+ * An adapter for :class: `datetime.date ` objects to :class: `strings <str> ` in
1543
+ `ISO 8601 `_ format.
1544
+ * An adapter for :class: `datetime.datetime ` objects to strings in
1545
+ ISO 8601 format.
1546
+ * A converter for :ref: `declared <sqlite3-converters >` "date" types to
1547
+ :class: `datetime.date ` objects.
1548
+ * A converter for declared "timestamp" types to
1549
+ :class: `datetime.datetime ` objects.
1550
+ Fractional parts will be truncated to 6 digits (microsecond precision).
1551
+
1552
+ .. note ::
1553
+
1554
+ The default "timestamp" converter ignores UTC offsets in the database and
1555
+ always returns a naive :class: `datetime.datetime ` object. To preserve UTC
1556
+ offsets in timestamps, either leave converters disabled, or register an
1557
+ offset-aware converter with :func: `register_converter `.
1558
+
1559
+ .. deprecated :: 3.12
1560
+
1561
+ .. _ISO 8601 : https://en.wikipedia.org/wiki/ISO_8601
1562
+
1563
+
1529
1564
.. _sqlite3-cli :
1530
1565
1531
1566
Command-line interface
@@ -1669,41 +1704,6 @@ The following example illustrates the implicit and explicit approaches:
1669
1704
.. literalinclude :: ../includes/sqlite3/converter_point.py
1670
1705
1671
1706
1672
- .. _sqlite3-default-converters :
1673
-
1674
- Default adapters and converters (deprecated)
1675
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1676
-
1677
- .. note ::
1678
-
1679
- The default adapters and converters are deprecated as of Python 3.12.
1680
- Instead, use the :ref: `sqlite3-adapter-converter-recipes `
1681
- and tailor them to your needs.
1682
-
1683
- The deprecated default adapters and converters consist of:
1684
-
1685
- * An adapter for :class: `datetime.date ` objects to :class: `strings <str> ` in
1686
- `ISO 8601 `_ format.
1687
- * An adapter for :class: `datetime.datetime ` objects to strings in
1688
- ISO 8601 format.
1689
- * A converter for :ref: `declared <sqlite3-converters >` "date" types to
1690
- :class: `datetime.date ` objects.
1691
- * A converter for declared "timestamp" types to
1692
- :class: `datetime.datetime ` objects.
1693
- Fractional parts will be truncated to 6 digits (microsecond precision).
1694
-
1695
- .. note ::
1696
-
1697
- The default "timestamp" converter ignores UTC offsets in the database and
1698
- always returns a naive :class: `datetime.datetime ` object. To preserve UTC
1699
- offsets in timestamps, either leave converters disabled, or register an
1700
- offset-aware converter with :func: `register_converter `.
1701
-
1702
- .. deprecated :: 3.12
1703
-
1704
- .. _ISO 8601 : https://en.wikipedia.org/wiki/ISO_8601
1705
-
1706
-
1707
1707
.. _sqlite3-adapter-converter-recipes :
1708
1708
1709
1709
Adapter and converter recipes
0 commit comments