git: 8f92a09f4337 - main - security/vuxml: Fix invalid escape sequence in Python re
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Jul 2026 06:32:12 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8f92a09f433732a50144162ea61ffff5514db14c
commit 8f92a09f433732a50144162ea61ffff5514db14c
Author: Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2026-07-01 17:26:02 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-07-03 06:31:59 +0000
security/vuxml: Fix invalid escape sequence in Python re
ports/security/vuxml/files/extra-validation.py:13:
SyntaxWarning: invalid escape sequence '\|'
re_invalid_package_name = re.compile('[@!#$%^&*()<>?/\|}{~:]')
This can be fixed by making the re.compile argument a raw R'...' string,
capital R avoids issues with some Microsoft IDEs.
(Alternative is doubling the backslash, but that's less readable.)
Pull Request: https://github.com/freebsd/freebsd-ports/pull/550
---
security/vuxml/files/extra-validation.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/vuxml/files/extra-validation.py b/security/vuxml/files/extra-validation.py
index 7e7663cc0083..03dd8c6e1147 100644
--- a/security/vuxml/files/extra-validation.py
+++ b/security/vuxml/files/extra-validation.py
@@ -10,7 +10,7 @@ if len(sys.argv) != 2:
sys.exit(1)
re_date = re.compile(r'^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$')
-re_invalid_package_name = re.compile('[@!#$%^&*()<>?/\|}{~:]')
+re_invalid_package_name = re.compile(R'[@!#$%^&*()<>?/\|}{~:]')
# warn if description has more than X characters
DESCRIPTION_LENGTH = 5000