Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: kvm@vger.kernel.org
Cc: Nina Schoetterl-Glausch <nsg@linux.ibm.com>,
	Andrew Jones <andrew.jones@linux.dev>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [kvm-unit-tests PATCH] scripts/pretty_print_stacks.py: Silence warning from Python 3.12
Date: Tue, 19 Dec 2023 14:23:13 +0100	[thread overview]
Message-ID: <20231219132313.31107-1-thuth@redhat.com> (raw)

Python 3.12 complains:

 ./scripts/pretty_print_stacks.py:41: SyntaxWarning:
  invalid escape sequence '\?'
  m = re.match(b'(.*) at (.*):(([0-9]+)|\?)([^:]*)', line)

Switch to a raw string to silence the problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 scripts/pretty_print_stacks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pretty_print_stacks.py b/scripts/pretty_print_stacks.py
index d990d300..5bce84fc 100755
--- a/scripts/pretty_print_stacks.py
+++ b/scripts/pretty_print_stacks.py
@@ -38,7 +38,7 @@ def pretty_print_stack(binary, line):
         return
 
     for line in out.splitlines():
-        m = re.match(b'(.*) at (.*):(([0-9]+)|\?)([^:]*)', line)
+        m = re.match(r'(.*) at (.*):(([0-9]+)|\?)([^:]*)', line)
         if m is None:
             puts('%s\n' % line)
             return
-- 
2.43.0


             reply	other threads:[~2023-12-19 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 13:23 Thomas Huth [this message]
2023-12-19 14:52 ` [kvm-unit-tests PATCH] scripts/pretty_print_stacks.py: Silence warning from Python 3.12 Nina Schoetterl-Glausch
2023-12-19 15:29   ` Thomas Huth

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=20231219132313.31107-1-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=andrew.jones@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=nsg@linux.ibm.com \
    --cc=pbonzini@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