MIRS571 opened a new pull request, #957:
URL: https://github.com/apache/burr/pull/957

   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
   
   - Forward connect_kwargs to the constructed SQLitePersister so the existing 
copy/unpickle paths retain them.
   - Correct the synchronous factory docstring and document option retention.
   - Add four regression cases covering from_values/from_config and 
copy/pickle, checking actual timeout values, independent connections, and 
checkpoint reads from a worker thread.
   - Keep the change limited to burr/core/persistence.py and 
tests/core/test_persistence.py; no new dependencies or database schema changes.
   
   ## How I tested this
   
   - Against upstream f8488d0cd034fa292c6d7e5fd1a431f12f403ff5, all four new 
regression cases fail with 5000 != 123.
   - With the fix, `python -m pytest tests/core/test_persistence.py 
tests/core/test_parallelism.py tests/core/test_application.py -q` completed 
with **193 passed** on Windows / Python 3.11.2.
   - The changed files passed Black 23.11.0, isort 5.12.0, Flake8 6.1.0 (single 
worker), ASF header, AST, end-of-file, trailing-whitespace and `git diff 
--check` checks. `pip check` also passed.
   - Additional local checks covered 24 constructor/reconstruction/options 
combinations and read-only SQLite URI restoration.
   - Tests used local SQLite files and worker threads; no paid model APIs or 
external database services were used.
   
   ## 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
   
   - [x] PR has an informative and human-readable title (this will be pulled 
into the release notes)
   - [x] Changes are limited to a single goal (no scope creep)
   - [ ] Code passed the pre-commit check & code is left cleaner/nicer than 
when first encountered. Applicable Python checks passed individually; the full 
pre-commit entry point and frontend hook were not run.
   - [x] Any _change_ in functionality is tested
   - [ ] New functions are documented (with a description, list of inputs, and 
expected output). N/A: no new public functions; the existing factory docstring 
was corrected.
   - [ ] Placeholder code is flagged / future TODOs are captured in comments. 
N/A: no placeholder code or new TODOs were introduced.
   - [x] Project documentation has been updated if adding/changing 
functionality. The factory docstring now documents connection-option retention.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to