bpo-27645: Fix version number in 'database in transaction' fallback (… · python/cpython@429ca44 (original) (raw)
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -37,14 +37,12 @@ def test_bad_target_closed_connection(self): | ||
37 | 37 | self.cx.backup(bck) |
38 | 38 | |
39 | 39 | def test_bad_target_in_transaction(self): |
40 | -if sqlite.sqlite_version_info == (3, 8, 7, 1): | |
41 | -self.skipTest('skip until we debug https://bugs.python.org/issue27645#msg313562') | |
42 | 40 | bck = sqlite.connect(':memory:') |
43 | 41 | bck.execute('CREATE TABLE bar (key INTEGER)') |
44 | 42 | bck.executemany('INSERT INTO bar (key) VALUES (?)', [(3,), (4,)]) |
45 | 43 | with self.assertRaises(sqlite.OperationalError) as cm: |
46 | 44 | self.cx.backup(bck) |
47 | -if sqlite.sqlite_version_info < (3, 8, 7): | |
45 | +if sqlite.sqlite_version_info < (3, 8, 8): | |
48 | 46 | self.assertEqual(str(cm.exception), 'target is in transaction') |
49 | 47 | |
50 | 48 | def test_keyword_only_args(self): |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1481,8 +1481,8 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject * | ||
1481 | 1481 | return NULL; |
1482 | 1482 | } |
1483 | 1483 | |
1484 | -#if SQLITE_VERSION_NUMBER < 3008007 | |
1485 | -/* Since 3.8.7 this is already done, per commit | |
1484 | +#if SQLITE_VERSION_NUMBER < 3008008 | |
1485 | +/* Since 3.8.8 this is already done, per commit | |
1486 | 1486 | https://www.sqlite.org/src/info/169b5505498c0a7e */ |
1487 | 1487 | if (!sqlite3_get_autocommit(((pysqlite_Connection *)target)->db)) { |
1488 | 1488 | PyErr_SetString(pysqlite_OperationalError, "target is in transaction"); |