◐ Shell
clean mode source ↗

sqlite3: add Cursor.row_factory pygetset and fix Connection.cursor() … by ever0de · Pull Request #7278 · RustPython/RustPython

…propagation

Add #[pygetset] getter/setter for Cursor.row_factory so that Python-level
attribute access reads/writes the Rust struct field instead of the
instance dict.

Fix Connection.cursor() to only propagate the connection's row_factory
to the cursor when the connection's row_factory is not None, matching
CPython behavior. Previously it unconditionally overwrote the cursor's
row_factory, discarding any factory set by a cursor subclass __init__.

youknowone

approved these changes Mar 1, 2026

youknowone pushed a commit to youknowone/RustPython that referenced this pull request

Mar 22, 2026
…propagation (RustPython#7278)

Add #[pygetset] getter/setter for Cursor.row_factory so that Python-level
attribute access reads/writes the Rust struct field instead of the
instance dict.

Fix Connection.cursor() to only propagate the connection's row_factory
to the cursor when the connection's row_factory is not None, matching
CPython behavior. Previously it unconditionally overwrote the cursor's
row_factory, discarding any factory set by a cursor subclass __init__.