gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: sqlite3 helper: be compatible


From: gnunet
Subject: [taler-wallet-core] branch master updated: sqlite3 helper: be compatible with python3.11
Date: Thu, 09 Jan 2025 11:51:11 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 3a93b7b40 sqlite3 helper: be compatible with python3.11
3a93b7b40 is described below

commit 3a93b7b405acd984e9da7349812c1328b6d1bbf5
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Jan 9 11:51:07 2025 +0100

    sqlite3 helper: be compatible with python3.11
---
 packages/idb-bridge/taler-helper-sqlite3 | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/packages/idb-bridge/taler-helper-sqlite3 
b/packages/idb-bridge/taler-helper-sqlite3
index 440b2e2f0..f200b958f 100755
--- a/packages/idb-bridge/taler-helper-sqlite3
+++ b/packages/idb-bridge/taler-helper-sqlite3
@@ -1,14 +1,36 @@
 #!/usr/bin/env python3
 
+# This file is part of GNU Taler
+# (C) 2024 Taler Systems S.A.
+#
+# GNU Taler is free software; you can redistribute it and/or modify it under 
the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3, or (at your option) any later version.
+#
+# GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+
 import sqlite3
 import sys
 import os
 
+v = sys.version_info
+if v.major < 3 or (v.major == 3 and v.minor < 11):
+    print(
+        "FATAL: python version >=3.11 required but running on",
+        sys.version,
+        file=sys.stderr,
+    )
+    sys.exit(1)
+
 print("started sqlite3 helper at", os.getcwd(), file=sys.stderr)
 
 enable_tracing = False
 
-
 def trace(*args):
     if not enable_tracing:
         return
@@ -222,7 +244,9 @@ while True:
             raise Exception("DB already connected")
         db_handle = pr.read_uint16()
         filename = pr.read_string()
-        dbconn = sqlite3.connect(filename, autocommit=True, 
isolation_level=None)
+        # This only works in python>=3.12
+        # dbconn = sqlite3.connect(filename, autocommit=True, 
isolation_level=None)
+        dbconn = sqlite3.connect(filename, isolation_level=None)
         # Make sure we are not in a transaction
         dbconn.commit()
         db_handles[db_handle] = dbconn

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]