File: 0005-Fix-Python-SyntaxWarning-caused-by-regex-string.patch

package info (click to toggle)
ros-catkin-pkg 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 760 kB
  • sloc: python: 4,645; xml: 183; makefile: 36
file content (22 lines) | stat: -rw-r--r-- 1,098 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Wed, 20 Aug 2025 18:34:27 +0200
Subject: Fix Python SyntaxWarning caused by regex string

Closes: #1087063
---
 src/catkin_pkg/cli/prepare_release.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/catkin_pkg/cli/prepare_release.py b/src/catkin_pkg/cli/prepare_release.py
index 9171adb..b7b5c9a 100644
--- a/src/catkin_pkg/cli/prepare_release.py
+++ b/src/catkin_pkg/cli/prepare_release.py
@@ -231,7 +231,7 @@ def _main():
     parser.add_argument('-y', '--non-interactive', action='store_true', default=False, help="Run without user interaction, confirming all questions with 'yes'")
     args = parser.parse_args()
 
-    if args.version and not re.match('^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$', args.version):
+    if args.version and not re.match(r'^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$', args.version):
         parser.error('The passed version must follow the conventions (positive integers x.y.z with no leading zeros)')
 
     if args.tag_prefix and ' ' in args.tag_prefix: