Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions 4 Lib/sqlite3/test/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ def test_bad_target_closed_connection(self):
self.cx.backup(bck)

def test_bad_target_in_transaction(self):
if sqlite.sqlite_version_info == (3, 8, 7, 1):
self.skipTest('skip until we debug https://bugs.python.org/issue27645#msg313562')
bck = sqlite.connect(':memory:')
bck.execute('CREATE TABLE bar (key INTEGER)')
bck.executemany('INSERT INTO bar (key) VALUES (?)', [(3,), (4,)])
with self.assertRaises(sqlite.OperationalError) as cm:
self.cx.backup(bck)
if sqlite.sqlite_version_info < (3, 8, 7):
if sqlite.sqlite_version_info < (3, 8, 8):
self.assertEqual(str(cm.exception), 'target is in transaction')

def test_keyword_only_args(self):
Expand Down
4 changes: 2 additions & 2 deletions 4 Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,8 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject *
return NULL;
}

#if SQLITE_VERSION_NUMBER < 3008007
/* Since 3.8.7 this is already done, per commit
#if SQLITE_VERSION_NUMBER < 3008008
/* Since 3.8.8 this is already done, per commit
https://www.sqlite.org/src/info/169b5505498c0a7e */
if (!sqlite3_get_autocommit(((pysqlite_Connection *)target)->db)) {
PyErr_SetString(pysqlite_OperationalError, "target is in transaction");
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.