Repository navigation
fix: preserve SQLite factory connection options on copy and unpickle - #957
Merged
elijahbenizzy merged 1 commit intoOct 17, 2026
Merged
Conversation
Generated-by: OpenAI Codex
elijahbenizzy
approved these changes
Oct 17, 2026
elijahbenizzy
left a comment
Contributor
There was a problem hiding this comment.
Straightforward plumbing -- the constructor already retained _connect_kwargs, from_values just never passed them. Thanks for the docstring fix too. Elijah
elijahbenizzy
enabled auto-merge (squash)
October 17, 2026 15:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQLitePersister.from_values() applies connect_kwargs to its initial connection but does not retain them on the persister. Consequently, copy() and pickle restoration open new connections with SQLite defaults. from_config() inherits the same behavior.
For example, a factory-created persister with timeout=0.123 and check_same_thread=False changes to a 5000 ms busy timeout after copying, and reading it from a worker thread raises sqlite3.ProgrammingError.
Changes
How I tested this
python -m pytest tests/core/test_persistence.py tests/core/test_parallelism.py tests/core/test_application.py -qcompleted with 193 passed on Windows / Python 3.11.2.git diff --checkchecks.pip checkalso passed.Notes
Prepared with OpenAI Codex assistance. The validation above was performed with Codex assistance and is not an independent human test run. No code from another project was introduced.
The full repository test matrix, full pre-commit entry point, frontend hook and complete CI have not been run locally. Applicable Python checks were run individually. Local testing does not establish compatibility with arbitrary external subclasses or unpicklable connection options. Preserving check_same_thread=False does not make arbitrary concurrent writes safe.
Generated-by: OpenAI Codex
Checklist