From 66f75a56143665c2beefb5c28dced93fa94e5445 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 26 Jan 2022 16:15:12 +0100 Subject: [PATCH] Revert dnspython to 1.x --- src/pretix/control/views/mailsetup.py | 3 ++- src/setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pretix/control/views/mailsetup.py b/src/pretix/control/views/mailsetup.py index d436294fc..1399a9915 100644 --- a/src/pretix/control/views/mailsetup.py +++ b/src/pretix/control/views/mailsetup.py @@ -42,7 +42,8 @@ logger = logging.getLogger(__name__) def get_spf_record(hostname): try: - for resp in dns.resolver.resolve(hostname, 'TXT'): + r = dns.resolver.Resolver() + for resp in r.query(hostname, 'TXT'): data = b''.join(resp.strings).decode() if data.lower().strip().startswith('v=spf1 '): # RFC7208, section 4.5 return data diff --git a/src/setup.py b/src/setup.py index 5cbd2fe04..5ced27ad9 100644 --- a/src/setup.py +++ b/src/setup.py @@ -190,7 +190,7 @@ setup( 'django-scopes==1.2.*', 'django-statici18n==2.1.*', 'djangorestframework==3.12.*', - 'dnspython==2.2.*', + 'dnspython<2.0', # do not upgrade, causes issues with eventlet / gunicorn 19 and we cannot upgrade gunicorn right now 'drf_ujson2==1.6.*', 'isoweek', 'jsonschema',