Commit 4685eda
Document register_adapter process-global scope and unregister pattern
The register_adapter docstring noted "stdlib pre-3.12 semantics"
but did not warn psycopg porters about the divergence from
psycopg3's per-connection AdaptersMap. Tests that register adapters
in pytest fixtures silently leak between tests under dqlite's
process-global registry.
Document:
- Scope is process-global (matches stdlib sqlite3 pre-3.12).
- psycopg3-style per-connection scoping is NOT supported.
- Tests should clean up explicitly.
- register_adapter(type_, None) does NOT unregister (raises
TypeError on the callable check); use
_ADAPTERS.pop(type_, None) for explicit removal in test
fixtures.
Pure docstring change. No behavioural impact.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 87f429f commit 4685eda
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
562 | 579 | | |
563 | 580 | | |
564 | 581 | | |
| |||
0 commit comments