python: use raw strings when appropriate

We had some incorrectly escaped strings that are now causing
SyntaxWarnings with Python 3.12

* bin/options.py, python/spot/aux_.py, python/spot/ltsmin.i,
python/spot/__init__.py: Here.
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2024-05-03 00:05:33 +02:00
parent dbe31c72c8
commit e6362b785b
5 changed files with 16 additions and 13 deletions

View file

@ -29,10 +29,10 @@ import subprocess
with open('Makefile.am', 'r') as mf:
lines = mf.read()
lines = re.sub('\s*\\\\\s*', ' ', lines)
bin_programs = re.search('bin_PROGRAMS\s*=([\w \t]*)', lines).group(1).split()
lines = re.sub(r'\s*\\\s*', ' ', lines)
bin_programs = re.search(r'bin_PROGRAMS\s*=([\w \t]*)', lines).group(1).split()
optre = re.compile('(-\w), (--[\w=-]+)')
optre = re.compile(r'(-\w), (--[\w=-]+)')
d = {}