Open moschlar opened 5 months ago
Seen on Debian Testing - I suppose these need to be raw strings by prefixing it with r?
r
/usr/lib/python3/dist-packages/Nagstamon/Helpers.py:462: SyntaxWarning: invalid escape sequence '\d' if re.search('^platform:el\d+$', os_release_dict.get('PLATFORM_ID', 'unknown')): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:94: SyntaxWarning: invalid escape sequence '\.' if re.search('2\.2\.[0-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:103: SyntaxWarning: invalid escape sequence '\.' elif re.search('2\.[3-6]\.[0-5]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:112: SyntaxWarning: invalid escape sequence '\.' elif re.search('2\.6\.[6-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:121: SyntaxWarning: invalid escape sequence '\.' elif re.search('2\.7\.[0-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:131: SyntaxWarning: invalid escape sequence '\.' elif re.search('2\.8\.[0-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:141: SyntaxWarning: invalid escape sequence '\.' elif re.search('18\.10\.[0-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:150: SyntaxWarning: invalid escape sequence '\.' elif re.search('19\.(04|10)\.[0-9]', raw_versioncheck) or re.search('20\.(04|10)\.[0-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:150: SyntaxWarning: invalid escape sequence '\.' elif re.search('19\.(04|10)\.[0-9]', raw_versioncheck) or re.search('20\.(04|10)\.[0-9]', raw_versioncheck): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:409: SyntaxWarning: invalid escape sequence '\/' if re.search('var _addrXML.*xml\/ndo\/host', raw): /usr/lib/python3/dist-packages/Nagstamon/Servers/Centreon/CentreonLegacy.py:413: SyntaxWarning: invalid escape sequence '\/' elif re.search('var _addrXML.*xml\/broker\/host', raw): /usr/lib/python3/dist-packages/Nagstamon/Servers/Livestatus.py:71: SyntaxWarning: invalid escape sequence '\d' m = re.match('.*?://([^:/]+?)(?::(\d+))?(?:/|$)', self.monitor_url) /usr/lib/python3/dist-packages/Nagstamon/Servers/Monitos3.py:90: SyntaxWarning: invalid escape sequence '\d' m = re.match('.*?://([^:/]+?)(?::(\d+))?(?:/|$)', self.monitor_url) /usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py:293: SyntaxWarning: invalid escape sequence '\s' if re.search(".*already\sexists.*", jobj["error"]["data"], re.I): # already exists
Hi @moschlar, This comes with newer Python version and is going to became more severe in the future. I think this is not critical yet but has to be fixed - I just did not look into this deeper.
Seen on Debian Testing - I suppose these need to be raw strings by prefixing it with
r
?