Skip to content

gh-128505: Expose an interface to sqlite3_file_control - #148870

Open
qris wants to merge 26 commits into
python:mainfrom
qris:sqlite3_file_control
Open

qris wants to merge 26 commits into
python:mainfrom
qris:sqlite3_file_control

Conversation

@qris

@qris qris commented Apr 22, 2026 •

Copy link
Copy Markdown

sqlite3_file_control can affect the semantics of a sqlite3 database, but is not exposed by the sqlite.Connection class. In particular, this addition allows callers to use the SQLITE_FCNTL_PERSIST_WAL opcode. SQLITE_FCNTL_PERSIST_WAL ensures that callers can open a WAL-mode database on a read-only mount even when the writers have closed the DB.

This is @hashbrowncipher's work from #128507, merged with cpython master and conflicts resolved in the hope of making progress in getting it merged.

hashbrowncipher and others added 16 commits January 4, 2025 17:55
Add a private API for raising DB-API compatible exceptions based on the
result code of SQLite C APIs. Some APIs do not store the error indicator
on the database pointer, so we need to be able to deduce the DB-API
compatible exception directly from the error code.

- rename _pysqlite_seterror() as set_error_from_db()
- introduce set_error_from_code()
Pull in changes including upstream merge of set_error_from_db.
@python-cla-bot

python-cla-bot Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

@qris
qris force-pushed the sqlite3_file_control branch from 628fe08 to 5ddea3b Compare July 18, 2026 22:04
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Oct 27, 2026
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants