[7.3] 48c299c13 doc: Use a raw string for regular expressions

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Dec 5 11:22:05 UTC 2023


commit 48c299c13a3b59ebad4bda1ffddad6fc75fba551
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Dec 4 10:45:20 2023 +0100

    doc: Use a raw string for regular expressions
    
    Since Python 3.12 unknown escape sequences trigger a warning.

diff --git a/doc/sphinx/vtc-syntax.py b/doc/sphinx/vtc-syntax.py
index cfc5a05ab..acf6f356c 100644
--- a/doc/sphinx/vtc-syntax.py
+++ b/doc/sphinx/vtc-syntax.py
@@ -38,7 +38,7 @@ import re
 def parse_file(fn, cl, tl, sl):
     p = False
     section = ""
-    resec = re.compile("\s*/?\* SECTION: ")
+    resec = re.compile(r"\s*/?\* SECTION: ")
 
     try:
         # Python3


More information about the varnish-commit mailing list