sb: Fix Python 3.12 safeConfigParser and invalid escape sequences

Updates #4968
This commit is contained in:
Chris Johns 2023-11-20 15:12:59 +11:00
parent ae81810adc
commit 63396e2ed6
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ class package(object):
get_recursion = ['cflags', 'libs']
no_dup_flags = ['-I', '-l', '-L']
dual_opts = ['-D', '-U', '-I', '-l', '-L']
lib_list_splitter = re.compile('[\s,]+')
lib_list_splitter = re.compile(r'[\s,]+')
loaded_prefixes = None
loaded = {}
@ -514,7 +514,7 @@ class package(object):
return None
s = ''
if self.file_:
mre = re.compile('\$\{[^\}]+\}')
mre = re.compile(r'\$\{[^\}]+\}')
s = self.fields[label.lower()]
expanded = True
tm = False

View File

@ -110,7 +110,7 @@ def _load_released_version_config():
import configparser
except ImportError:
import ConfigParser as configparser
v = configparser.SafeConfigParser()
v = configparser.ConfigParser()
try:
v.read(path.host(ver))
except Exception as e: