On Fri, Jan 06, 2017 at 10:18:51AM +0000, Stuart Henderson wrote:
> On 2017/01/06 10:23, Sebastien Marie wrote:
> > Hi,
> >
> > After an update of packages (pkg_add -u) urlwatch breaks at runtime with
> > the following exception:
> >
> > $ urlwatch
> > Traceback (most recent call last):
> > File "/usr/local/bin/urlwatch", line 101, in <module>
> > urlwatch_command.run()
> > File "/usr/local/lib/python3.6/site-packages/urlwatch/command.py", line
> > 167, in run
> > self.urlwatcher.close()
> > File "/usr/local/lib/python3.6/site-packages/urlwatch/main.py", line 97,
> > in close
> > self.cache_storage.close()
> > File "/usr/local/lib/python3.6/site-packages/urlwatch/storage.py", line
> > 465, in close
> > self.db.close()
> > File "/usr/local/lib/python3.6/site-packages/minidb.py", line 170, in
> > close
> > self._execute('VACUUM')
> > File "/usr/local/lib/python3.6/site-packages/minidb.py", line 153, in
> > _execute
> > return self.db.execute(sql)
> > sqlite3.OperationalError: cannot VACUUM from within a transaction
> >
> > Does the switch of MODPY_DEFAULT_VERSION_3 from 3.4 to 3.6 changed
> > something related to sqlite3 ?
> >
> > My host is amd64 with -current. (note that some parts of the port tree
> > aren't
> > updated due to libssl version changes : my system base isn't up-to-date
> > regarding latest libssl&co bumps).
>
> I can confirm this is also a problem with base + ports all updated.
>
>
This should be helped. ( also add test case for py-minidb)
Default behavior changed:
https://docs.python.org/3.6/library/sqlite3.html#controlling-transactions
--
Alexandr Shadchin
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/py-minidb/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile 3 Jan 2017 19:17:24 -0000 1.2
+++ Makefile 6 Jan 2017 10:35:55 -0000
@@ -5,7 +5,7 @@ COMMENT = simple SQLite3 store for Pyth
MODPY_EGG_VERSION = 2.0.1
DISTNAME = minidb-${MODPY_EGG_VERSION}
PKGNAME = py-minidb-${MODPY_EGG_VERSION}
-REVISION = 0
+REVISION = 1
CATEGORIES = databases
@@ -18,6 +18,11 @@ MASTER_SITES = http://thp.io/2010/minid
MODULES = lang/python
+TEST_DEPENDS = devel/py-nose,python3
+
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
+
+do-test:
+ cd ${WRKSRC} && ${LOCALBASE}/bin/nosetests-3
.include <bsd.port.mk>
Index: patches/patch-minidb_py
===================================================================
RCS file: patches/patch-minidb_py
diff -N patches/patch-minidb_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-minidb_py 6 Jan 2017 10:35:55 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- minidb.py.orig Fri Jan 6 15:15:12 2017
++++ minidb.py Fri Jan 6 15:34:23 2017
+@@ -131,7 +131,7 @@ class Store(object):
+ MINIDB_ATTR = '_minidb'
+
+ def __init__(self, filename=':memory:', debug=False, smartupdate=False):
+- self.db = sqlite3.connect(filename, check_same_thread=False)
++ self.db = sqlite3.connect(filename, check_same_thread=False,
isolation_level=None)
+ self.debug = debug
+ self.smartupdate = smartupdate
+ self.registered = {}