From 5fc757f2005c0b265dd61270bda4ea216b350aca Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Sat, 4 Apr 2020 16:08:44 +0000 Subject: Fix deprecation warning regarding invalid escape sequences. --- slixmpp/plugins/xep_0323/stanza/sensordata.py | 2 +- slixmpp/thirdparty/mini_dateutil.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp/plugins/xep_0323/stanza/sensordata.py b/slixmpp/plugins/xep_0323/stanza/sensordata.py index c0906cac..7ab1e3ba 100644 --- a/slixmpp/plugins/xep_0323/stanza/sensordata.py +++ b/slixmpp/plugins/xep_0323/stanza/sensordata.py @@ -516,7 +516,7 @@ class Field(ElementBase): :param value: string """ - pattern = re.compile("^\d+([|]\w+([.]\w+)*([|][^,]*)?)?(,\d+([|]\w+([.]\w+)*([|][^,]*)?)?)*$") + pattern = re.compile(r"^\d+([|]\w+([.]\w+)*([|][^,]*)?)?(,\d+([|]\w+([.]\w+)*([|][^,]*)?)?)*$") if pattern.match(value) is not None: self.xml.stringIds = value else: diff --git a/slixmpp/thirdparty/mini_dateutil.py b/slixmpp/thirdparty/mini_dateutil.py index e751a448..882a531f 100644 --- a/slixmpp/thirdparty/mini_dateutil.py +++ b/slixmpp/thirdparty/mini_dateutil.py @@ -160,7 +160,7 @@ except: return _fixed_offset_tzs[offsetmins] - _iso8601_parser = re.compile(""" + _iso8601_parser = re.compile(r""" ^ (?P [0-9]{4})?(?P-?)? (?P[0-9]{2})?(?P=ymdsep)? -- cgit v1.2.3