[elbe-devel] [PATCH 2/6] elbepack: soap: avoid warning about spyne importing cgi

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Jul 2 09:53:32 CEST 2024


There is not much we can do about this warning, so ignore it.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/daemons/soap/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/elbepack/daemons/soap/__init__.py b/elbepack/daemons/soap/__init__.py
index 09b8fb2a4b83..055f5df59211 100644
--- a/elbepack/daemons/soap/__init__.py
+++ b/elbepack/daemons/soap/__init__.py
@@ -3,11 +3,14 @@
 # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
 
 import logging
+import warnings
 
 from beaker.middleware import SessionMiddleware
 
 from spyne import Application
-from spyne.protocol.soap import Soap11
+with warnings.catch_warnings():
+    warnings.filterwarnings('ignore', "'cgi' is deprecated", DeprecationWarning)
+    from spyne.protocol.soap import Soap11
 from spyne.server.wsgi import WsgiApplication
 
 from elbepack.projectmanager import ProjectManager

-- 
2.45.2



More information about the elbe-devel mailing list