python-diskcache
python-diskcache copied to clipboard
Support sqlite builds with DQS=off
If sqlite3 is built with double-quoted string literals disabled (which is recommended, see https://www.sqlite.org/compile.html#dqs), diskcache starts failing with the following crypting error:
no such column: "size"
This is because the syntax WHERE key = "size" in standard SQL refers to a column named "size", not a string literal. Parsing this as a string literal is a conditional sqlite extension.
This patch makes the code more robust by avoiding this optional sqlite feature.
cc @grantjenks