[6.0] e9af6a8cd doc: Use a raw string for regular expressions

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Dec 5 11:24:06 UTC 2023


commit e9af6a8cd480c739629d787eeb99abe51dfbadf1
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 1c40f30d5..497c7b4b3 100644
--- a/doc/sphinx/vtc-syntax.py
+++ b/doc/sphinx/vtc-syntax.py
@@ -36,7 +36,7 @@ import re
 def parse_file(fn, cl, tl, sl):
     p = False
     section = ""
-    resec = re.compile("\s*/?\* SECTION: ")
+    resec = re.compile(r"\s*/?\* SECTION: ")
 
     f = open(fn, "r", encoding="UTF-8")
 


More information about the varnish-commit mailing list