Skip to content

Commit 8233cd7

Browse files
Trim stale Binary() comment in returns_native_bytes rationale
The comment justifying returns_native_bytes = True used to cite the PEP 249 Binary() constructor's bytes return as a contributing reason. Binary() is now aliased to memoryview for stdlib sqlite3 parity, so the justification would mislead future readers — but the pin itself remains correct because returns_native_bytes concerns the wire-codec's BLOB result-row type (still native bytes), not the bind-path constructor's return type. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9e4d50b commit 8233cd7

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/sqlalchemydqlite/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ class DqliteDialect(SQLiteDialect):
101101
supports_statement_cache = True
102102

103103
# dqlitedbapi returns native Python ``bytes`` for BLOB columns (the
104-
# wire codec emits ``bytes`` for ``ValueType.BLOB``, and the
105-
# PEP 249 ``Binary()`` constructor returns ``bytes``). Pin True
106-
# locally so ``LargeBinary.result_processor`` can skip the redundant
107-
# ``bytes(value)`` wrap on every BLOB cell.
104+
# wire codec emits ``bytes`` for ``ValueType.BLOB`` on the result
105+
# path). Pin True locally so ``LargeBinary.result_processor`` can
106+
# skip the redundant ``bytes(value)`` wrap on every BLOB cell.
108107
returns_native_bytes = True
109108

110109
# dqlite's wire protocol has a first-class BOOLEAN tag

0 commit comments

Comments
 (0)