From 569aa34ea5eec46ec0d899f4db682687964feec0 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Wed, 6 Jul 2011 23:25:30 +0000 Subject: Fixed #16250 -- Made test database creation support code in the PostgreSQL DB backend compatible with psycopg2 2.4.2. Implemented this by adding an internal hook for work that should be performed before that point. Also, regarding the `DatabaseCreation.set_autocommit()` method: * Stop using it for such tasks * Stop providing an implementation that tries to cover all the possible idioms a third party database backend DB-API 2 driver could need to activate autocommit. It is now left for third party backends to implement. This can be backwards incompatible in the case of user applications that: * Had started using this method * Use a third a party database backend git-svn-id: http://code.djangoproject.com/svn/django/trunk@16520 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/sqlite3/creation.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/db/backends/sqlite3') diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py index f6fe6a4534..cd393561d1 100644 --- a/django/db/backends/sqlite3/creation.py +++ b/django/db/backends/sqlite3/creation.py @@ -69,3 +69,6 @@ class DatabaseCreation(BaseDatabaseCreation): if test_database_name and test_database_name != ":memory:": # Remove the SQLite database file os.remove(test_database_name) + + def set_autocommit(self): + self.connection.connection.isolation_level = None -- cgit v1.3