Code

Ticket #10476: remove_unnecessary_test.diff

File remove_unnecessary_test.diff, 1.7 KB (added by Richard Davies <richard.davies@…>, 5 years ago)

Remove unnecessary test - it works already!

Line 
1Index: django/db/backends/postgresql_psycopg2/base.py
2===================================================================
3--- django/db/backends/postgresql_psycopg2/base.py      (revision 10832)
4+++ django/db/backends/postgresql_psycopg2/base.py      (working copy)
5@@ -109,12 +109,7 @@
6                 # No savepoint support for earlier version of PostgreSQL.
7                 self.features.uses_savepoints = False
8             if self.features.uses_autocommit:
9-                if self._version[0:2] < (8, 2):
10-                    # FIXME: Needs extra code to do reliable model insert
11-                    # handling, so we forbid it for now.
12-                    from django.core.exceptions import ImproperlyConfigured
13-                    raise ImproperlyConfigured("You cannot use autocommit=True with PostgreSQL prior to 8.2 at the moment.")
14-                else:
15+                if self._version[0:2] >= (8, 2):
16                     # FIXME: Eventually we're enable this by default for
17                     # versions that support it, but, right now, that's hard to
18                     # do without breaking other things (#10509).
19Index: docs/topics/db/transactions.txt
20===================================================================
21--- docs/topics/db/transactions.txt     (revision 10832)
22+++ docs/topics/db/transactions.txt     (working copy)
23@@ -283,7 +283,7 @@
24 
25 .. versionadded:: 1.1
26 
27-With PostgreSQL 8.2 or later, there is an advanced option to run PostgreSQL
28+There is an advanced option to run PostgreSQL
29 with :ref:`database-level autocommit <ref-databases>`. If you use this option,
30 there is no constantly open transaction, so it is always possible to continue
31 after catching an exception. For example::