From 0571ef298c87949f60036e702515e2052d0fa6e0 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Mon, 23 Oct 2023 14:13:27 +0300 Subject: [PATCH] Fix syntax warnings with Python 3.12 --- flanker/addresslib/plugins/gmail.py | 2 +- flanker/mime/message/headers/wrappers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flanker/addresslib/plugins/gmail.py b/flanker/addresslib/plugins/gmail.py index 85563cb3..2d51a941 100644 --- a/flanker/addresslib/plugins/gmail.py +++ b/flanker/addresslib/plugins/gmail.py @@ -23,7 +23,7 @@ main-part -> alphanum { [dot] alphanum } tags -> { + [ dot-atom ] } dot-atom -> atom { [ dot atom ] } - atom -> { A-Za-z0-9!#$%&'*+\-/=?^_`{|}~ } + atom -> { A-Za-z0-9!#$%&'*+\\-/=?^_`{|}~ } alphanum -> alpha | num dot -> . ''' diff --git a/flanker/mime/message/headers/wrappers.py b/flanker/mime/message/headers/wrappers.py index c3695334..4dbcc255 100644 --- a/flanker/mime/message/headers/wrappers.py +++ b/flanker/mime/message/headers/wrappers.py @@ -182,7 +182,7 @@ def scan(cls, string): class Subject(six.text_type): - RE_RE = re.compile("((RE|FW|FWD|HA)([[]\d])*:\s*)*", re.I) + RE_RE = re.compile(r"((RE|FW|FWD|HA)([[]\d])*:\s*)*", re.I) def __new__(cls, *args, **kw): return six.text_type.__new__(cls, *args, **kw)