From d027993ed14df1f9e25f13d7da87db11447c8c95 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 14 Feb 2015 17:31:53 +0100 Subject: [PATCH] [1.8.x] Removed 'autocommit' options for the psycopg2 backend. It was documented as not having any effect since Django 1.6. Backport of a73c8540a888021feb640abefa936a76e21b6a1a from master --- django/db/backends/postgresql_psycopg2/base.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 2efb904997..5f7ca69611 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -146,10 +146,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): 'database': settings_dict['NAME'] or 'postgres', } conn_params.update(settings_dict['OPTIONS']) - if 'autocommit' in conn_params: - del conn_params['autocommit'] - if 'isolation_level' in conn_params: - del conn_params['isolation_level'] + conn_params.pop('isolation_level', None) if settings_dict['USER']: conn_params['user'] = settings_dict['USER'] if settings_dict['PASSWORD']: