summaryrefslogtreecommitdiff
path: root/django/db/transaction.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2019-01-18 10:04:29 -0500
committerTim Graham <timograham@gmail.com>2019-01-30 10:19:48 -0500
commit7e6b214ed34f5562dbd83cf54924a5b589a29715 (patch)
tree2a2aa16c023638436bea449acdb06224bf7f33c7 /django/db/transaction.py
parent5a5c77d55dc85c7e6cf910243257e408887f412a (diff)
Fixed #30116 -- Dropped support for Python 3.5.
Diffstat (limited to 'django/db/transaction.py')
-rw-r--r--django/db/transaction.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/django/db/transaction.py b/django/db/transaction.py
index 901d8b62e7..508a10c924 100644
--- a/django/db/transaction.py
+++ b/django/db/transaction.py
@@ -173,14 +173,6 @@ class Atomic(ContextDecorator):
connection.commit_on_exit = True
connection.needs_rollback = False
if not connection.get_autocommit():
- # 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:
- raise TransactionManagementError(
- "Your database backend doesn't behave properly when "
- "autocommit is off. Turn it on before using 'atomic'.")
# Pretend we're already in an atomic block to bypass the code
# that disables autocommit to enter a transaction, and make a
# note to deal with this case in __exit__.