Revert dnspython to 1.x

This commit is contained in:
Raphael Michel
2022-01-26 16:15:12 +01:00
parent 6f30c347c0
commit 66f75a5614
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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',