invalid escape sequences in bitmask-root
The use of combination of python3.12 and bitmask-root leads to some warnings:
pea@peabox:bitmask-vpn-misc /usr/bin//bitmask-root
/home/pea/projects/leap/bitmask-vpn-misc/./bitmask-root:177: SyntaxWarning: invalid escape sequence '\d'
"NUMBER": lambda s: re.match("^\d+$", s),
/home/pea/projects/leap/bitmask-vpn-misc/./bitmask-root:180: SyntaxWarning: invalid escape sequence '\:'
"CIPHER": lambda s: re.match("^[A-Z0-9-\:]+$", s),
/home/pea/projects/leap/bitmask-vpn-misc/./bitmask-root:182: SyntaxWarning: invalid escape sequence '\.'
"^[a-zA-Z0-9_\.\@][a-zA-Z0-9_\-\.\@]*\$?$", s), # IEEE Std 1003.1-2001
/home/pea/projects/leap/bitmask-vpn-misc/./bitmask-root:850: SyntaxWarning: invalid escape sequence '\ '
if QUBES_PROXY and QUBES_VER >= 3 and run("grep", "installed\ by\ " +
bitmask-root: ERROR: No such command. Try bitmask-root help
These are shown in the bitmask log:
2024-05-06T09:46:02+02:00 TRC Command exited gracefully: "/usr/sbin/bitmask-root:177: SyntaxWarning: invalid escape sequence '\d'
"NUMBER": lambda s: re.match("^\d+$", s),
/usr/sbin/bitmask-root:180: SyntaxWarning: invalid escape sequence '\:'
"CIPHER": lambda s: re.match("^[A-Z0-9-\:]+$", s),
/usr/sbin/bitmask-root:182: SyntaxWarning: invalid escape sequence '\.'
"^[a-zA-Z0-9_\.\@][a-zA-Z0-9_\-\.\@]*\$?$", s), # IEEE Std 1003.1-2001
/usr/sbin/bitmask-root:850: SyntaxWarning: invalid escape sequence '\ '
if QUBES_PROXY and QUBES_VER >= 3 and run("grep", "installed\ by\ " +" cmd="/usr/sbin/bitmask-root firewall stop"
2024-05-06T09:46:02+02:00 INF Enabled UDP
What's new in python
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)
Source: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
Edited by Pea Nut