Skip to content

Commit 3a5926c

Browse files
Reconcile the close() docstring on description clearing
The docstring framed description becoming None as an accidental divergence from stdlib while claiming a stdlib-parity goal for the other preserved fields. The clear is deliberate: rownumber returns None when description is None, so clearing it is how a closed cursor's rownumber reads None. Say that instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1084399 commit 3a5926c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/dqlitedbapi/cursor.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,8 +1556,10 @@ def close(self) -> None:
15561556
body without masking the body's exception. Clears the result-set
15571557
surface (description / _rows / _row_index) but PRESERVES rowcount
15581558
and lastrowid (stdlib parity; SA reads lastrowid lazily after
1559-
close). arraysize is also kept (it is a config hint). description
1560-
becoming None is the one divergence from stdlib.
1559+
close). arraysize is also kept (it is a config hint). Clearing
1560+
description is deliberate (stdlib and aiosqlite keep it): it drives
1561+
the rownumber extension's closed-cursor None semantics, since
1562+
rownumber returns None when description is None.
15611563
"""
15621564
# PEP 249 §6.1.2: clear messages first. Suppress AttributeError
15631565
# so close() from __exit__ after a body exception cannot supplant

0 commit comments

Comments
 (0)