@@ -12,10 +12,9 @@ class WriteBuffer:
1212 Thread-safety: NOT thread-safe. A single ``WriteBuffer``
1313 instance must be owned by one thread (or one asyncio
1414 coroutine) at a time. The single-owner contract matches Go's
15- ``driver.Conn`` layer in go-dqlite; see issue 021 for the full
16- analysis. ``write_padded`` guards against the specific
17- torn-payload/pad interleave described in issue 034, but that is
18- a narrow defense, not a general thread-safety guarantee.
15+ ``driver.Conn`` layer in go-dqlite. ``write_padded`` guards
16+ against a specific torn-payload/pad interleave, but that is a
17+ narrow defense, not a general thread-safety guarantee.
1918 """
2019
2120 def __reduce__ (self ) -> None : # type: ignore[override]
@@ -36,8 +35,8 @@ def write_padded(self, data: bytes) -> None:
3635
3736 The padded bytes are built locally and emitted via a single
3837 ``bytearray.extend`` so that under accidental concurrent misuse
39- (see issue 021 for the single-owner contract) two threads'
40- payloads and padding cannot interleave. This still does not make
38+ two threads' payloads and padding cannot interleave. This
39+ still does not make
4140 ``WriteBuffer`` thread-safe in any strong sense, but it removes
4241 the torn payload/pad split that used to be visible to callers.
4342 """
@@ -67,7 +66,7 @@ class ReadBuffer:
6766 Thread-safety: NOT thread-safe. A single ``ReadBuffer`` instance
6867 must be owned by one thread (or one asyncio coroutine) at a
6968 time. The single-owner contract matches Go's ``driver.Conn``
70- layer in go-dqlite; see issue 021 for the full analysis .
69+ layer in go-dqlite.
7170
7271 Concurrent misuse from multiple threads produces **silent data
7372 corruption**, not exceptions. Specifically:
@@ -81,10 +80,9 @@ class ReadBuffer:
8180
8281 The ``poison()`` mechanism does NOT and CANNOT detect this
8382 class of failure. Poison is designed to catch single-owner
84- torn state from interrupted signal delivery (see issues 037,
85- 041, 045). It cannot observe lost-update races or torn reads
86- that produce valid-looking output. See issue 050 for
87- reproduction details.
83+ torn state from interrupted signal delivery. It cannot observe
84+ lost-update races or torn reads that produce valid-looking
85+ output.
8886
8987 If you need concurrent access to a single wire stream, wrap
9088 every call site in an ``asyncio.Lock`` (for coroutines) or
@@ -167,7 +165,7 @@ def feed(self, data: bytes) -> None:
167165 ``reset()``/``clear()``) if the resulting buffer size would
168166 exceed ``max_message_size``.
169167
170- Signal-safety note (issue 048) : the mutation block below is
168+ Signal-safety note: the mutation block below is
171169 wrapped in ``try/except BaseException`` so that any async
172170 exception leaking out — most notably between the
173171 ``_maybe_compact()`` return and the subsequent
@@ -235,7 +233,7 @@ def has_message(self) -> bool:
235233
236234 # Read size from header (first 4 bytes = size in words)
237235 size_words = int .from_bytes (self ._data [self ._pos : self ._pos + 4 ], "little" )
238- # Torn-read sanity (issue 051) : if the slice was widened by
236+ # Torn-read sanity: if the slice was widened by
239237 # a concurrent realloc, report "something to consume" so the
240238 # caller's while-loop proceeds to read_message(), which then
241239 # poisons. has_message() itself is a total predicate and
@@ -280,7 +278,7 @@ def peek_header(self) -> tuple[int, int, int] | None:
280278 self ._check_torn_size (size_words )
281279 total_size = HEADER_SIZE + (size_words * WORD_SIZE )
282280 if total_size > self ._max_message_size :
283- # Format size in hex: under concurrent misuse (see issue 033)
281+ # Format size in hex: under concurrent misuse
284282 # `total_size` can be a torn bigint whose decimal form exceeds
285283 # CPython's 4300-digit int-to-str limit, which would make this
286284 # f-string itself raise ValueError. Hex formatting has no cap.
@@ -311,7 +309,7 @@ def read_message(self) -> bytes | None:
311309 total_size = HEADER_SIZE + (size_words * WORD_SIZE )
312310
313311 if total_size > self ._max_message_size :
314- # Format size in hex: under concurrent misuse (see issue 033)
312+ # Format size in hex: under concurrent misuse
315313 # `total_size` can be a torn bigint whose decimal form exceeds
316314 # CPython's 4300-digit int-to-str limit, which would make this
317315 # f-string itself raise ValueError. Hex formatting has no cap.
@@ -458,7 +456,7 @@ def peek_bytes(self, n: int) -> bytes | None:
458456 def _maybe_compact (self ) -> None :
459457 """Compact buffer if we've consumed a lot.
460458
461- Signal-safety note (issue 037) : this method mutates two
459+ Signal-safety note: this method mutates two
462460 attributes — ``_data`` and ``_pos`` — which compile to two
463461 ``STORE_ATTR`` bytecodes. CPython checks for pending signals
464462 at bytecode line transitions, so a ``KeyboardInterrupt`` (or
@@ -507,11 +505,11 @@ def clear(self) -> None:
507505 """Clear buffer state and un-poison.
508506
509507 Equivalent to ``reset()``. Kept as a convenience alias because
510- ``clear()`` predates the poison concept (issue 026) and was
511- briefly inconsistent with ``reset()`` — it used to leave the
508+ ``clear()`` predates the poison concept and was briefly
509+ inconsistent with ``reset()`` — it used to leave the
512510 ``_poisoned`` flag intact, which meant a caller who reached
513511 for ``clear()`` as a recovery primitive got a half-fresh
514512 buffer that still raised ``ProtocolError`` on the next
515- operation (issue 040) .
513+ operation.
516514 """
517515 self .reset ()
0 commit comments