Imported Upstream version 0.1.4 upstream/0.1.4
authorHyunjee Kim <hj0426.kim@samsung.com>
Fri, 10 Apr 2020 05:17:04 +0000 (14:17 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Fri, 10 Apr 2020 05:17:10 +0000 (14:17 +0900)
Change-Id: I909aa51d7d603973bceac1059f88ebea5e948cde
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
PKG-INFO
lib/dbapi2.py
pysqlite3.egg-info/PKG-INFO
setup.py
src/connection.c
src/module.c

index d2063fdda94ec1815438c2ed0e31495eb4b17ad4..7333bd45c8bbf3847ab20b703bfa1169472f3762 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysqlite3
-Version: 0.1.3
+Version: 0.1.4
 Summary: DB-API 2.0 interface for Sqlite 3.x
 Home-page: https://github.com/rigglemania/pysqlcipher3
 Author: Charles Leifer
index 80dd4f99f0fb969ddcc5951b0c6874ddbf062d09..9d37b660ffa931409bb137dfc701c9db45920b09 100644 (file)
@@ -1,3 +1,4 @@
+#-*- coding: ISO-8859-1 -*-
 # pysqlite2/dbapi2.py: the DB-API 2.0 interface
 #
 # Copyright (C) 2004-2005 Gerhard Häring <gh@ghaering.de>
index d2063fdda94ec1815438c2ed0e31495eb4b17ad4..7333bd45c8bbf3847ab20b703bfa1169472f3762 100644 (file)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysqlite3
-Version: 0.1.3
+Version: 0.1.4
 Summary: DB-API 2.0 interface for Sqlite 3.x
 Home-page: https://github.com/rigglemania/pysqlcipher3
 Author: Charles Leifer
index 8864b9039a851bd19f93a9dc74fa5bd49fcf73f6..3adf1ec12d168221be28d795249b9418f9aa54f9 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ from setuptools import Extension
 # If you need to change anything, it should be enough to change setup.cfg.
 
 PACKAGE_NAME = 'pysqlite3'
-VERSION = '0.1.3'
+VERSION = '0.1.4'
 
 # define sqlite sources
 sources = [os.path.join('src', source)
index 3b08b2bd431a8b2288ead51e5205d9be4c04be1e..58c8d3650512244dfbcb0af9af7bb9b8ae031ec1 100644 (file)
@@ -76,6 +76,7 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
     static char *kwlist[] = {
         "database", "timeout", "detect_types", "isolation_level",
         "check_same_thread", "factory", "cached_statements", "uri", "flags",
+        "vfs",
         NULL
     };
 
@@ -87,15 +88,16 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
     int check_same_thread = 1;
     int cached_statements = 100;
     int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
+    char *vfs = NULL;
     int uri = 0;
     double timeout = 5.0;
     int rc;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|diOiOipi", kwlist,
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|diOiOipiz", kwlist,
                                      PyUnicode_FSConverter, &database_obj, &timeout, &detect_types,
                                      &isolation_level, &check_same_thread,
                                      &factory, &cached_statements, &uri,
-                                     &flags))
+                                     &flags, &vfs))
     {
         return -1;
     }
@@ -119,14 +121,14 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
 #ifdef SQLITE_OPEN_URI
     Py_BEGIN_ALLOW_THREADS
     rc = sqlite3_open_v2(database, &self->db,
-                         flags | (uri ? SQLITE_OPEN_URI : 0), NULL);
+                         flags | (uri ? SQLITE_OPEN_URI : 0), vfs);
 #else
     if (uri) {
         PyErr_SetString(pysqlite_NotSupportedError, "URIs not supported");
         return -1;
     }
     Py_BEGIN_ALLOW_THREADS
-    rc = sqlite3_open_v2(database, &self->db, flags, NULL);
+    rc = sqlite3_open_v2(database, &self->db, flags, vfs);
 #endif
     Py_END_ALLOW_THREADS
 
index b64f8c8ab9dfd1c6ba42cf153e98c0ec518c624b..3ea765b0d3882f34afd93c50919cd828809b8978 100644 (file)
@@ -60,6 +60,7 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
     static char *kwlist[] = {
         "database", "timeout", "detect_types", "isolation_level",
         "check_same_thread", "factory", "cached_statements", "uri", "flags",
+        "vfs",
         NULL
     };
     PyObject* database;
@@ -69,16 +70,17 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
     int check_same_thread = 1;
     int cached_statements;
     int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
+    char *vfs;
     int uri = 0;
     double timeout = 5.0;
 
     PyObject* result;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|diOiOip", kwlist,
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|diOiOipiz", kwlist,
                                      &database, &timeout, &detect_types,
                                      &isolation_level, &check_same_thread,
                                      &factory, &cached_statements, &uri,
-                                     &flags))
+                                     &flags, &vfs))
     {
         return NULL;
     }