summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/module.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-108494: Argument Clinic: fix support of Limited C API (GH-108536)Serhiy Storchaka2023-08-281-1/+1
|
* gh-93057: Deprecate positional use of optional sqlite3.connect() params ↵Erlend E. Aasland2023-08-151-0/+11
| | | | (#107948)
* gh-107938: Synchonise the signature of of sqlite3.connect and ↵Erlend E. Aasland2023-08-141-17/+8
| | | | sqlite3.Connection.__init__ (#107939)
* gh-106320: Remove private _PyImport C API functions (#106383)Victor Stinner2023-07-031-0/+6
| | | | | | * Remove private _PyImport C API functions: move them to the internal C API (pycore_import.h). * No longer export most of these private functions. * _testcapi avoids private _PyImport_GetModuleAttrString().
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-181-40/+4
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-051-0/+1
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-103489: Add get/set config methods to sqlite3.Connection (#103506)Erlend E. Aasland2023-04-261-0/+43
|
* gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour ↵Erlend E. Aasland2022-11-121-1/+6
| | | | | | | | | | (#93823) Introduce the autocommit attribute to Connection and the autocommit parameter to connect() for PEP 249-compliant transaction handling. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* gh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory ↵Erlend Egeberg Aasland2022-07-231-36/+33
| | | | | | | | | | | | (#95146) This PR partially reverts gh-24421 (PR) and fixes the remaining concerns given in gh-93044 (issue): - keyword arguments are passed as positional arguments to factory() - if an argument is not passed to sqlite3.connect(), its default value is passed to factory() Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-90016: Reword sqlite3 adapter/converter docs (#93095)Erlend Egeberg Aasland2022-06-251-6/+6
| | | | | | Also add adapters and converter recipes. Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com
* gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742)Serhiy Storchaka2022-06-141-7/+1
| | | | | | It combines PyImport_ImportModule() and PyObject_GetAttrString() and saves 4-6 lines of code on every use. Add also _PyImport_GetModuleAttr() which takes Python strings as arguments.
* gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)Kalyan2022-06-071-1/+1
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-93044: No longer convert the database argument of sqlite3.connect() to ↵Serhiy Storchaka2022-05-211-3/+2
| | | | | bytes (GH-93046) Just pass it to the factory as is.
* gh-92547: Remove deprecated sqlite3 features (#92548)Erlend Egeberg Aasland2022-05-161-31/+0
| | | | | | | | | | The following sqlite3 features were deprecated in 3.10, scheduled for removal in 3.12: - sqlite3.OptimizedUnicode (gh-23163) - sqlite3.enable_shared_cache (gh-24008) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-69093: Expose sqlite3.Blob as a class (GH-91550)Jelle Zijlstra2022-04-151-0/+1
| | | | I noticed this was missing while writing typeshed stubs. It's useful to expose it for use in annotations and for exploration.
* gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)Erlend Egeberg Aasland2022-04-151-1/+5
| | | | | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no> Co-authored-by: palaviv <palaviv@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)Erlend Egeberg Aasland2022-04-121-0/+4
|
* bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612)Erlend Egeberg Aasland2022-03-081-10/+13
|
* bpo-46874: Speed up sqlite3 user-defined aggregate 'step' method (GH-31604)Erlend Egeberg Aasland2022-03-031-0/+2
|
* bpo-46541: Remove unneeded visits from sqlite3 (GH-31609)Erlend Egeberg Aasland2022-02-281-7/+0
|
* bpo-46541: Replace _Py_IDENTIFIER with _Py_ID in sqlite3 (GH-31351)Erlend Egeberg Aasland2022-02-161-5/+32
|
* bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized ↵Eric Snow2022-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | global objects. (gh-30928) We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code. It is still used in a number of non-builtin stdlib modules. The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime. A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings). https://bugs.python.org/issue46541#msg411799 explains the rationale for this change. The core of the change is in: * (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros * Include/internal/pycore_runtime_init.h - added the static initializers for the global strings * Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState * Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings. That check is added to the PR CI config. The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()). This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *. The following are not changed (yet): * stop using _Py_IDENTIFIER() in the stdlib modules * (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API * (maybe) intern the strings during runtime init https://bugs.python.org/issue46541
* bpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227)Erlend Egeberg Aasland2021-11-031-0/+30
| | | | | | | | | Use the compile-time selected default SQLite threaded mode to set the DB-API 2.0 attribute 'threadsafety' Mappings: - SQLITE_THREADSAFE=0 => threadsafety=0 - SQLITE_THREADSAFE=1 => threadsafety=3 - SQLITE_THREADSAFE=2 => threadsafety=1
* bpo-24139: Add support for SQLite extended result codes (GH-28076)Erlend Egeberg Aasland2021-11-021-1/+126
|
* bpo-42064: Adapt `sqlite3` to multi-phase init (PEP 489) (GH-29234)Erlend Egeberg Aasland2021-11-021-20/+99
|
* bpo-45243: Add support for setting/getting `sqlite3` connection limits ↵Erlend Egeberg Aasland2021-11-011-0/+15
| | | | (GH-28463)
* bpo-45634: Don't combine error checks when adding `sqlite3` int constants ↵Erlend Egeberg Aasland2021-10-311-41/+48
| | | | (GH-29251)
* bpo-42064: Convert `sqlite3` global state to module state (GH-29073)Erlend Egeberg Aasland2021-10-271-14/+7
|
* bpo-16379: expose SQLite error codes and error names in `sqlite3` (GH-27786)Erlend Egeberg Aasland2021-08-301-2/+73
|
* bpo-42064: Optimise `sqlite3` state access, part 1 (GH-27273)Erlend Egeberg Aasland2021-07-291-2/+3
| | | | | | | | | | Prepare for module state: - Add "get state by defining class" and "get state by module def" stubs - Add AC defining class when needed - Add state pointer to connection context - Pass state as argument to utility functions Automerge-Triggered-By: GH:encukou
* bpo-42064: Finalise establishing sqlite3 global state (GH-27155)Erlend Egeberg Aasland2021-07-201-14/+10
| | | | | | With this, all sqlite3 static globals have been moved to the global state. There are a couple of global static strings left, but there should be no need for adding them to the state. https://bugs.python.org/issue42064
* bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)Erlend Egeberg Aasland2021-07-141-36/+19
| | | Automerge-Triggered-By: GH:encukou
* bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)Erlend Egeberg Aasland2021-06-231-17/+19
| | | Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
* bpo-40956: Convert sqlite3.connect and sqlite3.Connection.__init__ to AC ↵Erlend Egeberg Aasland2021-06-201-42/+40
| | | | (GH-24421)
* bpo-42064: Move sqlite3 types to global state (GH-26537)Erlend Egeberg Aasland2021-06-151-16/+18
| | | | | | | | | * Move connection type to global state * Move cursor type to global state * Move prepare protocol type to global state * Move row type to global state * Move statement type to global state * ADD_TYPE takes a pointer * pysqlite_get_state is now static inline
* bpo-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module ↵Erlend Egeberg Aasland2021-06-031-2/+29
| | | | | (GH-24203) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43434: Clean up sqlite3.connect() after GH-25818 (GH-25823)Erlend Egeberg Aasland2021-05-021-8/+1
|
* bpo-43434: Move sqlite3.connect audit events to sqlite3.Connection.__init__ ↵Erlend Egeberg Aasland2021-05-021-9/+0
| | | | (GH-25818)
* bpo-43762: Add audit events for loading of sqlite3 extensions (GH-25246)Erlend Egeberg Aasland2021-04-261-0/+8
|
* bpo-43505: Explicitly initialize and shutdown sqlite3 (GH-25404)Erlend Egeberg Aasland2021-04-141-11/+14
|
* bpo-40810: Require SQLite 3.7.15 (GH-24106)Erlend Egeberg Aasland2021-01-061-4/+4
|
* bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)Erlend Egeberg Aasland2020-12-271-10/+3
|
* bpo-42264: Deprecate sqlite3.OptimizedUnicode (GH-23163)Erlend Egeberg Aasland2020-11-171-9/+0
|
* bpo-1635741: _sqlite3 uses PyModule_AddObjectRef() (GH-23148)Erlend Egeberg Aasland2020-11-041-12/+13
|
* bpo-40956: Convert _sqlite3 module level functions to Argument Clinic (GH-22484)Erlend Egeberg Aasland2020-10-311-70/+91
|
* bpo-42021: Fix possible ref leaks during _sqlite3 module init (GH-22673)Erlend Egeberg Aasland2020-10-151-126/+84
|
* bpo-41861: Convert _sqlite3 CursorType and ConnectionType to heap types ↵Erlend Egeberg Aasland2020-10-011-5/+5
| | | | (GH-22478)
* bpo-41861: Convert _sqlite3 RowType and StatementType to heap types (GH-22444)Erlend Egeberg Aasland2020-10-011-3/+3
|
* bpo-41861: Convert _sqlite3 PrepareProtocolType to heap type (GH-22428)Erlend Egeberg Aasland2020-09-281-3/+3
|
* bpo-41861: Convert _sqlite3 cache and node static types to heap types (GH-22417)Erlend Egeberg Aasland2020-09-271-1/+1
|