From: Paolo Bonzini Date: Mon, 16 Oct 2023 06:22:56 +0000 (+0200) Subject: docs/sphinx: avoid invalid escape in Python string X-Git-Tag: v8.1.3~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23b0010786f354845f8ff7760bc1af83fc160649;p=thirdparty%2Fqemu.git docs/sphinx: avoid invalid escape in Python string This is an error in Python 3.12; fix it by using a raw string literal. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini (cherry picked from commit e4b6532cc0a5518c0dea15eeca573829df9ec1df) Signed-off-by: Michael Tokarev --- diff --git a/docs/sphinx/hxtool.py b/docs/sphinx/hxtool.py index fb0649a3d5b..9f6b9d87dcc 100644 --- a/docs/sphinx/hxtool.py +++ b/docs/sphinx/hxtool.py @@ -49,7 +49,7 @@ def serror(file, lnum, errtext): def parse_directive(line): """Return first word of line, if any""" - return re.split('\W', line)[0] + return re.split(r'\W', line)[0] def parse_defheading(file, lnum, line): """Handle a DEFHEADING directive"""