summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-04-26 19:22:03 (GMT)
committerGitHub <noreply@github.com>2023-04-26 19:22:03 (GMT)
commit222c63fc6b91f42e7cc53574615f4e9b7a33c28f (patch)
tree92bc902ce83e10b4fcad67cccfa292e3851a98c0 /Doc
parent28a05f4cc2b150b3ff02ec255daf1b6ec886ca6f (diff)
downloadcpython-222c63fc6b91f42e7cc53574615f4e9b7a33c28f.zip
cpython-222c63fc6b91f42e7cc53574615f4e9b7a33c28f.tar.gz
cpython-222c63fc6b91f42e7cc53574615f4e9b7a33c28f.tar.bz2
gh-103015: Add entrypoint keyword param to sqlite3.Connection.load_extension (#103073)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sqlite3.rst22
-rw-r--r--Doc/whatsnew/3.12.rst5
2 files changed, 25 insertions, 2 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 51146e0..34de0bf 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -1041,12 +1041,25 @@ Connection objects
(2, 'broccoli pie', 'broccoli cheese onions flour')
(3, 'pumpkin pie', 'pumpkin sugar flour butter')
- .. method:: load_extension(path, /)
+ .. method:: load_extension(path, /, *, entrypoint=None)
- Load an SQLite extension from a shared library located at *path*.
+ Load an SQLite extension from a shared library.
Enable extension loading with :meth:`enable_load_extension` before
calling this method.
+ :param str path:
+
+ The path to the SQLite extension.
+
+ :param entrypoint:
+
+ Entry point name.
+ If ``None`` (the default),
+ SQLite will come up with an entry point name of its own;
+ see the SQLite docs `Loading an Extension`_ for details.
+
+ :type entrypoint: str | None
+
.. audit-event:: sqlite3.load_extension connection,path sqlite3.Connection.load_extension
.. versionadded:: 3.2
@@ -1054,6 +1067,11 @@ Connection objects
.. versionchanged:: 3.10
Added the ``sqlite3.load_extension`` auditing event.
+ .. versionadded:: 3.12
+ The *entrypoint* parameter.
+
+ .. _Loading an Extension: https://www.sqlite.org/loadext.html#loading_an_extension_
+
.. method:: iterdump
Return an :term:`iterator` to dump the database as SQL source code.
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 9a32f98..9d79430 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -406,6 +406,11 @@ sqlite3
:ref:`transaction handling <sqlite3-transaction-control-autocommit>`.
(Contributed by Erlend E. Aasland in :gh:`83638`.)
+* Add *entrypoint* keyword-only parameter to
+ :meth:`~sqlite3.Connection.load_extension`,
+ for overriding the SQLite extension entry point.
+ (Contributed by Erlend E. Aasland in :gh:`103015`.)
+
threading
---------