1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Refs #27025 -- Removed obsolete sqlite3 transaction management workaround for Python 3.6+.

Obsolete per https://bugs.python.org/issue10740#msg274816.
This commit is contained in:
Tim Graham
2018-10-25 19:54:48 -04:00
committed by GitHub
parent c6525bea9e
commit 717ee63e56
3 changed files with 6 additions and 13 deletions

View File

@@ -173,8 +173,8 @@ class Atomic(ContextDecorator):
connection.commit_on_exit = True
connection.needs_rollback = False
if not connection.get_autocommit():
# Some database adapters (namely sqlite3) don't handle
# transactions and savepoints properly when autocommit is off.
# sqlite3 in Python < 3.6 doesn't handle transactions and
# savepoints properly when autocommit is off.
# Turning autocommit back on isn't an option; it would trigger
# a premature commit. Give up if that happens.
if connection.features.autocommits_when_autocommit_is_off: