Skip to content

Commit e4a46d6

Browse files
committed
test.py: pass "count" to re.sub() with kwarg
since Python 3.13, passing count to `re.sub()` as positional argument has been deprecated. and when runnint `test.py` with Python 3.13, we have following warning: ``` /home/kefu/dev/scylladb/./test.py:1477: DeprecationWarning: 'count' is passed as positional argument args.tests = set(re.sub(r'.* List configured unit tests\n(.*)\n', r'\1', out, 1, re.DOTALL).split("\n")) ``` see also python/cpython#56166 in order to silence this distracting warning, let's pass `count` using kwarg. this change was created in the same spirit of c3be4a3. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
1 parent b32b7ab commit e4a46d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ def parse_cmd_line() -> argparse.Namespace:
15401540
# [1/1] List configured modes
15411541
# debug release dev
15421542
args.modes = re.sub(r'.* List configured modes\n(.*)\n', r'\1',
1543-
out, 1, re.DOTALL).split("\n")[-1].split(' ')
1543+
out, count=1, flags=re.DOTALL).split("\n")[-1].split(' ')
15441544
except Exception:
15451545
print(palette.fail("Failed to read output of `ninja mode_list`: please run ./configure.py first"))
15461546
raise

0 commit comments

Comments
 (0)