Skip to content
Snippets Groups Projects
Commit c6e4fec0 authored by kiilerix's avatar kiilerix
Browse files

subrepoutil: pass re.sub 'count' argument by name

Python 3.13 started warning:

  DeprecationWarning: 'count' is passed as positional argument
parent 4fbee56e
No related branches found
No related tags found
2 merge requests!1030merge stable into default,!935python3.13: use sys.executable instead of removed Py_GetProgramFullPath
......@@ -131,7 +131,7 @@
# extra escapes are needed because re.sub string decodes.
repl = re.sub(br'\\\\([0-9]+)', br'\\\1', repl)
try:
src = re.sub(pattern, repl, src, 1)
src = re.sub(pattern, repl, src, count=1)
except re.error as e:
raise error.Abort(
_(b"bad subrepository pattern in %s: %s")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment