verify fails with dnspython==1.15.0

Bug #1856546 reported by Magnus Eén
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy
Fix Released
Medium
Scott Kitterman

Bug Description

In version 1.15.0 the dns.resolver.query() method does not include the lifetime argument. And hence throw the following exception:
TypeError: query() got an unexpected keyword argument 'lifetime'

Steps to reproduce:
1. Install dnspython==1.15.0
root@ceadb57ae1bc:/# python3 -m pip install dnspython==1.15.0

2. Query the resolver with the same arguments as the dkimpy code:
>>> import dns.resolver
>>> a = dns.resolver.query('example.com', dns.rdatatype.TXT, raise_on_no_answer=False, lifetime=5)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: query() got an unexpected keyword argument 'lifetime'

Please let me know in case you need more information.

Best,
Magnus

Revision history for this message
Scott Kitterman (kitterman) wrote :

Thanks. 1.16 has been out for over a year, so I think a reasonable resolution to this bug would be to set that as the minimum version. I don't think 1.15 compatibility is worth the complexity of dealing with it.

Changed in dkimpy:
importance: Undecided → Medium
status: New → Confirmed
Changed in dkimpy:
assignee: nobody → Scott Kitterman (kitterman)
milestone: none → 1.0.2
status: Confirmed → Fix Committed
Revision history for this message
Magnus Eén (magnuseen) wrote :

Thanks a lot for the quick fix Scott.
I completely agree with you. My project does actually not contain pythondns, byt only py3dns (due to pyspf). This is why it has not been updated since a long while ago. And since dkimpy chooses pythondns over pydns, I discovered this. :-)

Appreciate your work on this package!

Best,
Magnus

Revision history for this message
Scott Kitterman (kitterman) wrote :

2019-12-31 Version 1.0.2
    - dknewkey: On posix operating systems set file permissions to 600 for
      ed25519 private key files (as is already done for RSA) (LP: #1857827)
    - Update documentation URL in README.md
    - Set minimum dnspython version to 1.16 because previous versions can not
      support the timeout parameter (LP: #1856546)

Changed in dkimpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.