On 2017/01/06 10:18, 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.
>
>
I added this workaround to py-minidb:
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/py-minidb/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- Makefile 3 Jan 2017 19:17:24 -0000 1.2
+++ Makefile 6 Jan 2017 10:33:37 -0000 1.3
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.2 2017/01/03 19:17:24 landry Exp $
+# $OpenBSD: Makefile,v 1.3 2017/01/06 10:33:37 sthen Exp $
COMMENT = simple SQLite3 store for Python objects
MODPY_EGG_VERSION = 2.0.1
DISTNAME = minidb-${MODPY_EGG_VERSION}
PKGNAME = py-minidb-${MODPY_EGG_VERSION}
-REVISION = 0
+REVISION = 1
CATEGORIES = databases
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:33:37 -0000 1.1
@@ -0,0 +1,15 @@
+$OpenBSD: patch-minidb_py,v 1.1 2017/01/06 10:33:37 sthen Exp $
+
+workaround https://bugs.python.org/issue28518
+
+--- minidb.py.orig Fri Jan 6 10:29:50 2017
++++ minidb.py Fri Jan 6 10:31:03 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 = {}