From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 4/5] functional: always enable all python warnings
Date: Mon, 21 Jul 2025 10:16:13 +0200 [thread overview]
Message-ID: <20250721081614.262563-5-thuth@redhat.com> (raw)
In-Reply-To: <20250721081614.262563-1-thuth@redhat.com>
From: Daniel P. Berrangé <berrange@redhat.com>
Of most importance is that this gives us a heads-up if anything
we rely on has been deprecated. The default python behaviour
only emits a warning if triggered from __main__ which is very
limited.
Setting the env variable further ensures that any python child
processes will also display warnings.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250715143023.1851000-11-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/qemu_test/testcase.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 71c7160adcf..2a78e735f16 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -19,6 +19,7 @@
from subprocess import run
import sys
import tempfile
+import warnings
import unittest
import uuid
@@ -235,6 +236,9 @@ def tearDown(self):
self._log_fh.close()
def main():
+ warnings.simplefilter("default")
+ os.environ["PYTHONWARNINGS"] = "default"
+
path = os.path.basename(sys.argv[0])[:-3]
cache = os.environ.get("QEMU_TEST_PRECACHE", None)
--
2.50.0
next prev parent reply other threads:[~2025-07-21 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 8:16 [PULL 0/5] Functional test patches and 32-bit arm Linux header removal Thomas Huth
2025-07-21 8:16 ` [PULL 1/5] linux-headers: Remove the 32-bit arm headers Thomas Huth
2025-07-21 8:16 ` [PULL 2/5] functional: ensure log handlers are closed Thomas Huth
2025-07-21 8:16 ` [PULL 3/5] functional: ensure sockets and files " Thomas Huth
2025-07-21 8:16 ` Thomas Huth [this message]
2025-07-21 8:16 ` [PULL 5/5] docs/devel: fix over-quoting of QEMU_TEST_KEEP_SCRATCH Thomas Huth
2025-07-21 13:59 ` [PULL 0/5] Functional test patches and 32-bit arm Linux header removal Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250721081614.262563-5-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).