FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-24139: Add support for SQLite extended result codes by erlend-aasland · Pull Request #28076 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .c  (1) .py  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Fix #if's for error codes between SQLite 3.8.2 and 3.8.10
SQLITE_CONSTRAINT_ROWID, SQLITE_READONLY_DBMOVED, and SQLITE_AUTH_USER
  • Loading branch information
Erlend E. Aasland committed Sep 20, 2021
commit a36a6b9b4edf9ec5067a6be77e7dcaf52cb2c6d2
12 changes: 6 additions & 6 deletions Lib/sqlite3/test/test_dbapi.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ def test_module_constants(self):
]
if sqlite.version_info >= (3, 8, 1):
consts += ["SQLITE_CANTOPEN_CONVPATH", "SQLITE_IOERR_CONVPATH"]
if sqlite.version_info >= (3, 8, 10):
consts += [
"SQLITE_AUTH_USER",
"SQLITE_CONSTRAINT_ROWID",
"SQLITE_READONLY_DBMOVED",
]
if sqlite.version_info >= (3, 8, 2):
consts.append("SQLITE_CONSTRAINT_ROWID")
if sqlite.version_info >= (3, 8, 3):
consts.append("SQLITE_READONLY_DBMOVED")
if sqlite.version_info >= (3, 8, 7):
consts.append("SQLITE_AUTH_USER")
if sqlite.version_info >= (3, 9, 0):
consts.append("SQLITE_IOERR_VNODE")
if sqlite.version_info >= (3, 10, 0):
Expand Down
8 changes: 6 additions & 2 deletions Modules/_sqlite/module.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,15 @@ static const struct {
DECLARE_ERROR_CODE(SQLITE_CANTOPEN_CONVPATH),
DECLARE_ERROR_CODE(SQLITE_IOERR_CONVPATH),
#endif
#if SQLITE_VERSION_NUMBER >= 3008010
DECLARE_ERROR_CODE(SQLITE_AUTH_USER),
#if SQLITE_VERSION_NUMBER >= 3008002
DECLARE_ERROR_CODE(SQLITE_CONSTRAINT_ROWID),
#endif
#if SQLITE_VERSION_NUMBER >= 3008003
DECLARE_ERROR_CODE(SQLITE_READONLY_DBMOVED),
#endif
#if SQLITE_VERSION_NUMBER >= 3008007
DECLARE_ERROR_CODE(SQLITE_AUTH_USER),
#endif
#if SQLITE_VERSION_NUMBER >= 3009000
DECLARE_ERROR_CODE(SQLITE_IOERR_VNODE),
#endif
Expand Down

Back | FazBrowse Home | New Git URL