You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sqlite3.Row.__hash__ raises SystemError instead of TypeError for an unhashable value #153695
sqlite3.Row.__hash__ calls PyObject_Hash on the row's description and data
without checking the -1 error return, so hashing a row that holds an
unhashable value raises SystemError instead of TypeError:
importsqlite3sqlite3.register_converter("LST", lambdab: [1, 2, 3])
con=sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_DECLTYPES)
con.row_factory=sqlite3.Rowcon.execute("create table t(x LST)")
con.execute("insert into t values (?)", (b"x",))
row=con.execute("select x from t").fetchone()
hash(row)
# SystemError: <built-in function hash> returned a result with an exception set
Activity
gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (#153696)
[3.14] gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (G…
[3.15] gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (G…
[3.13] gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (G…