Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core


Commits:
fcee03cb by Abhilash Raj at 2020-09-06T21:36:51+00:00
Add support for dnspython>2.0

dnspython changed the lowest level dns.set.Set object and changed the .items to
be a dict instead of a list previously. We, for some reason, look into the
individual items to check for DMARC rules and that fails with KeyError.

- - - - -
022c127c by Abhilash Raj at 2020-09-06T21:36:51+00:00
Merge branch 'dnspython' into 'master'

Add support for dnspython>2.0

Closes #743

See merge request mailman/mailman!698
- - - - -


3 changed files:

- setup.py
- src/mailman/docs/NEWS.rst
- src/mailman/rules/dmarc.py


Changes:

=====================================
setup.py
=====================================
@@ -115,7 +115,7 @@ case second 'm'.  Any other spelling is incorrect.""",
         'authheaders>=0.9.2',
         'authres>=1.0.1',
         'click>=7.0.0',
-        'dnspython>=1.14.0,<2.0.0',
+        'dnspython>=1.14.0',
         'falcon>1.0.0',
         'flufl.bounce',
         'flufl.i18n>=2.0',


=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -82,7 +82,7 @@ Others
 * Made (un)subscription confirmation email subjects user friendly and
   translatable.  (Closes #541)
 * Implemented a new email ``who`` command to obtain list membership.
-
+* Add support  for dnspython>=2.0. (Closes #743)
 
 3.3.1
 =====


=====================================
src/mailman/rules/dmarc.py
=====================================
@@ -211,12 +211,12 @@ def is_reject_or_quarantine(mlist, email, dmarc_domain, 
org=False):
         name = txt_rec.name.to_text().lower()
         if txt_rec.rdtype == dns.rdatatype.CNAME:
             cnames[name] = (
-                txt_rec.items[0].target.to_text())
+                next(iter(txt_rec.items)).target.to_text())
         if txt_rec.rdtype != dns.rdatatype.TXT:
             continue
         result = EMPTYSTRING.join(
             str(record, encoding='utf-8')
-            for record in txt_rec.items[0].strings)
+            for record in next(iter(txt_rec.items)).strings)
         results_by_name.setdefault(name, []).append(result)
     expands = list(want_names)
     seen = set(expands)



View it on GitLab: 
https://gitlab.com/mailman/mailman/-/compare/b215a85185ba54a01b77757c868ca8c855273274...022c127ca87b45abf4486e62362aae4482aec8a4

-- 
View it on GitLab: 
https://gitlab.com/mailman/mailman/-/compare/b215a85185ba54a01b77757c868ca8c855273274...022c127ca87b45abf4486e62362aae4482aec8a4
You're receiving this email because of your account on gitlab.com.


_______________________________________________
Mailman-checkins mailing list -- mailman-checkins@python.org
To unsubscribe send an email to mailman-checkins-le...@python.org
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: arch...@jab.org

Reply via email to