Merge branch 'fix-deprecations' into 'master'

Fix deprecation warning regarding invalid escape sequences.

See merge request poezio/slixmpp!40
This commit is contained in:
mathieui 2020-04-04 18:53:15 +02:00
commit 9126bd8392
2 changed files with 2 additions and 2 deletions

View file

@ -516,7 +516,7 @@ class Field(ElementBase):
:param value: string :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: if pattern.match(value) is not None:
self.xml.stringIds = value self.xml.stringIds = value
else: else:

View file

@ -160,7 +160,7 @@ except:
return _fixed_offset_tzs[offsetmins] return _fixed_offset_tzs[offsetmins]
_iso8601_parser = re.compile(""" _iso8601_parser = re.compile(r"""
^ ^
(?P<year> [0-9]{4})?(?P<ymdsep>-?)? (?P<year> [0-9]{4})?(?P<ymdsep>-?)?
(?P<month>[0-9]{2})?(?P=ymdsep)? (?P<month>[0-9]{2})?(?P=ymdsep)?