[elbe-devel] [PATCH v2] db: Ignore 2.0 warning

Bastian Germann bage at linutronix.de
Sat Apr 1 17:03:46 CEST 2023


sqlalchemy has published v2.0 and introduced warnings in v1.4.x about its
new API. This makes python3-elbe-buildenv fail on installation.

Ignore the warning and make sure that a sqlalchemy version < 2.0 is
installed.

Signed-off-by: Bastian Germann <bage at linutronix.de>
---
 debian/control | 2 +-
 elbepack/db.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 47bb65280f..bdbb5d986c 100644
--- a/debian/control
+++ b/debian/control
@@ -120,7 +120,7 @@ Depends: ${misc:Depends},
   python3-mako,
   python3-parted,
   python3-passlib,
-  python3-sqlalchemy,
+  python3-sqlalchemy ( << 2),
   python3-debian,
   qemu-user-static,
   qemu-utils,
diff --git a/elbepack/db.py b/elbepack/db.py
index ecdd396dc6..6824554d62 100644
--- a/elbepack/db.py
+++ b/elbepack/db.py
@@ -35,6 +35,7 @@ from elbepack.elbeproject import ElbeProject
 from elbepack.elbexml import (ElbeXML, ValidationMode)
 from elbepack.dosunix import dos2unix
 
+os.environ['SQLALCHEMY_SILENCE_UBER_WARNING'] = "1"
 Base = declarative_base()
 
 
-- 
2.39.2



More information about the elbe-devel mailing list