GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — sqlite3: exception from a collation callback is replaced by SystemError · Issue #161837 · python/cpython Open Labels extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportSummaryWhen a collation callback raises, sqlite3 returns Expected: the collation's exception should propagate, or at least chain as the cause. Reproducerimport sqlite3 def coll(a, b): if a == "boom": raise KeyError("collation raised") return (a > b) - (a < b) con = sqlite3.connect(":memory:") con.create_collation("c", coll) con.execute("create table t(x, y)") con.executemany("insert into t values (?, ?)", [(1, "a"), (-9223372036854775808, "boom")]) cur = con.execute("select case when y = 'q' collate c then abs(x) else 0 end from t") cur.fetchone() KeyError: 'collation raised' The above exception was the direct cause of the following exception: SystemError: <class 'sqlite3.OperationalError'> returned a result with an exception set CPython versions tested on:CPython main branch Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |