Repository navigation
Python: fix(duckdb): prefer injected connections over settings - #9979
narendra (Narendra02053) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the injected DuckDB connection precedence change.
No open issues 🎉
What changed in this PR
Fixes #9953 by letting injected DuckDB connections take precedence over connection settings in DuckDBStore and DuckDBCollection, while preserving caller ownership and existing behavior when no client is supplied.
Changes:
- Remove validation that rejected injected clients combined with connection settings.
- Add regression tests for ignored settings, connection ownership, and avoiding new connections.
- Update constructor documentation and the README to explain precedence.
| File | Description |
|---|---|
python/packages/duckdb/tests/duckdb/test_settings.py |
Test injected-client precedence and ownership behavior. |
python/packages/duckdb/README.md |
Document ignored settings when borrowing a connection. |
python/packages/duckdb/agent_framework_duckdb/_vector_store.py |
Remove conflicting-settings rejection and update constructor documentation. |
Review effort: Balanced
|
narendra (@Narendra02053) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
@microsoft-github-policy-service agree |
|
Hi, I checked the failed Merge Gatekeeper run. |
Summary
Fixes #9953.
When a caller provides an existing
DuckDBPyConnection, the injected connection now takes precedence over connection-related settings.connection_string,config,env_file_path, andenv_file_encodingwhen a client is injected.Validation
uv run poe syntax: 86 tasks passed.ag-uiandhyperlight.