Bug report
Bug description:
Tab completion fails in sqlite3 when the name of an attached DB contains a quote.
Minimal code repro:
import sqlite3
from sqlite3._completer import _complete
con = sqlite3.connect(":memory:")
con.execute("""ATTACH ':memory:' AS [has"quote]""")
con.execute("""CREATE TABLE [has"quote].example_table(value)""")
print(_complete(con, "exam", 0)) # sqlite3.OperationalError: unrecognized token: "".sqlite_master
con.close()
Minimal CLI repro if you prefer:
(open the CLI)
>>> <python executable≥ -m sqlite3
(in CLI):
>>> ATTACH ':memory:' AS "has""quote";
>>> CREATE TABLE "has""quote".example_table(value);
>>> SELECT * FROM exam<press tab here and it doesn't work>
CPython versions tested on:
CPython main branch, 3.15
Operating systems tested on:
macOS
Linked PRs
Bug report
Bug description:
Tab completion fails in
sqlite3when the name of an attached DB contains a quote.Minimal code repro:
Minimal CLI repro if you prefer:
CPython versions tested on:
CPython main branch, 3.15
Operating systems tested on:
macOS
Linked PRs