Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- define SQLITE_OMIT_LOAD_EXTENSION by default, so that building

  on platforms like Mac OS X works out of the box; if you need
  this functionality, modify setup.cfg before building

- made .connect(..., isolation_level=None) work again. The check
  introduced in the last version made it impossible to create
  "autocommit" connections immediately
  • Loading branch information...
commit 83b648ae5037d8e0740cfe7996346d906827caa1 1 parent b4aac25
@ghaering ghaering authored
Showing with 11 additions and 3 deletions.
  1. +8 −0 pysqlite2/test/regression.py
  2. +1 −1  setup.cfg
  3. +2 −2 src/connection.c
View
8 pysqlite2/test/regression.py
@@ -219,6 +219,14 @@ def __init__(self, con):
except:
self.fail("should have raised InterfaceError")
+ def CheckAutoCommit(self):
+ """
+ Verifies that creating a connection in autocommit mode works.
+ 2.5.3 introduced a regression so that these could no longer
+ be created.
+ """
+ con = sqlite.connect(":memory:", isolation_level=None)
+
def suite():
regression_suite = unittest.makeSuite(RegressionTests, "Check")
return unittest.TestSuite((regression_suite,))
View
2  setup.cfg
@@ -3,4 +3,4 @@
#include_dirs=/usr/local/include
#library_dirs=/usr/local/lib
libraries=sqlite3
-define=
+define=SQLITE_OMIT_LOAD_EXTENSION
View
4 src/connection.c
@@ -80,6 +80,8 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
return -1;
}
+ self->initialized = 1;
+
self->begin_statement = NULL;
self->statement_cache = NULL;
@@ -205,8 +207,6 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
self->ProgrammingError = pysqlite_ProgrammingError;
self->NotSupportedError = pysqlite_NotSupportedError;
- self->initialized = 1;
-
return 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.