Commit 7bff07f
Correct DqliteConnection.__reduce__ docstring on actual class state
The TypeError diagnostic and rationale comment named "a WeakSet of
registered cursors" — but DqliteConnection has no WeakSet, no
``_cursors`` attribute, no cursor tracking at all (verified by
``vars(conn)`` enumeration). The empirical "post-connect cryptic
AttributeError('Can't pickle local object
'WeakSet.__init__.<locals>._remove'')" claim in the docstring and
test docstring was also empirically wrong — pre-fix, bypassing the
guard, ``DqliteConnection`` actually pickled silently and produced
a corrupt duplicate (the same failure mode ConnectionPool's reject
correctly described).
Replace both pieces of misleading text with the actual class state
(live socket / loop-bound asyncio.Lock / loop-bound wire protocol)
and the actual pre-fix failure mode (silent corrupt duplicate via
default __reduce__). The runtime ``TypeError`` message and the
rationale comment now match what ``vars(conn)`` actually shows.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 18cee40 commit 7bff07f
2 files changed
Lines changed: 16 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
961 | 962 | | |
962 | 963 | | |
963 | | - | |
964 | | - | |
| 964 | + | |
| 965 | + | |
965 | 966 | | |
966 | 967 | | |
967 | 968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments