Description: Fix SyntaxWarning in regex patterns by using raw strings The package emitted SyntaxWarnings ("invalid escape sequence") during piuparts tests. This patch adds the 'r' prefix to the regex patterns in jube/benchmark.py and jube/util/util.py, ensuring that backslashes are treated as literal characters. . jube (2.7.1-3) unstable; urgency=low . * Fix SyntaxWarning in regex patterns by adding raw strings. Author: Gonzalo Silvalde Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085657 --- The information above should follow the Patch Tagging Guidelines, please checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: (upstream|backport|vendor|other), (|commit:) Bug: Bug-Debian: https://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: (no|not-needed|) Applied-Upstream: , (|commit:) Reviewed-By: Last-Update: 2025-03-12 --- jube-2.7.1.orig/jube/benchmark.py +++ jube-2.7.1/jube/benchmark.py @@ -680,7 +680,7 @@ class Benchmark(object): filenames = [file for file in os.listdir(self.bench_dir) if file.startswith(log_fname.split('.')[0]) and file != log_fname] - filenames.sort(key=lambda o: int(re.split('_|\.', o)[1])) + filenames.sort(key=lambda o: int(re.split(r'_|\.', o)[1])) with open(current_logfile_name, 'a') as outfile: for fname in filenames: with open(os.path.join(self.bench_dir, fname), 'r') as infile: --- jube-2.7.1.orig/jube/util/util.py +++ jube-2.7.1/jube/util/util.py @@ -244,7 +244,7 @@ def substitution(text, substitution_dict text = new_text # Final substitution to remove $$ tmp = string.Template(text) - return re.sub("\$(?=([\s]|$))","$$",tmp.safe_substitute(str_substitution_dict)) + return re.sub(r"\$(?=([\s]|$))","$$",tmp.safe_substitute(str_substitution_dict)) def convert_type(name, value_type, value, stop=True):