Skip to content

Commit

Permalink
Merge branch 'pyspf-2_0-branch' of https://github.com/sdgathman/pyspf
Browse files Browse the repository at this point in the history
…into pyspf-2_0-branch
  • Loading branch information
sdgathman committed Jan 1, 2020
2 parents ebbf26a + b5881a4 commit 5239c81
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ Version 2.0.14
* Fix doctest for CNAME fixes to work with python and python3
* Fix dnspython integration so that SPF TempError is properly raised when
there are timeout or no nameserver errors
* Add missing use of timeout parameter for dnspython DNSLookup
* Restore DNSLookup API for pydnsv(DNS) for tcp fallback works again
* Update Installation section of README.md

Version 2.0.13 - September 2, 2019
* Add support for use of dnspython (dns) if installed
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

Installation
------------
This package requires PyDNS (or Py3DNS for running with Python 3) and either
the ipaddr or python3.3 and later. PyDNS is available at
http://pydns.sourceforge.net. Binary and source RPMs for PyDNS are also
available from http://pymilter.sourceforge.net. Py3DNS is available on pypi
and at https://launchpad.net/py3dns. The ipaddr module is available from
http://code.google.com/p/ipaddr-py or as part of the Python standard library
starting with python3.3 (as ipaddress). This package requires authres from
either pypi or http://launchpad.net/authentication-results-python to process
and generate RFC 5451 Authentication Results headers.
This package requires either the dns (dnspython) or DNS (PyDNS/Py3DNS modules
and either the ipaddr module or python3.3 and later. It does not work with
the ipaddress module backport. For dnspython, at least version 1.16.0 is
required. The authres module is required to process and generate RFC 7601
Authentication Results headers. These can all be installed from pypi via pip.
Additionally, they are also available via many distribution packaging systems.

pyspf uses traditional python distutils, so dependencies are not installed
automatically. pyspf can be installed from pypi via pip or manually:

After unpacking the source distribution, install this in your site-
specific Python extension directory::
Expand All @@ -23,9 +23,7 @@ specific Python extension directory::
# python setup.py install

The minimum Python version required is python2.6. The spf module in this
version has been tested with python3.2 and does not require using 2to3. It
will work with all versions of pydns or py3dns. It works either with the
stand alone ipaddr module or the standard library ipaddress module.
version has been tested with python3 versions through python3.8.

Testing
-------
Expand Down
2 changes: 1 addition & 1 deletion spf.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def DNSLookup_dnspython(name, qtype, tcpfallback=True, timeout=30):
retVal = []
try:
# FIXME: how to disable TCP fallback in dnspython if not tcpfallback?
answers = dns.resolver.query(name, qtype)
answers = dns.resolver.query(name, qtype, lifetime=timeout)
for rdata in answers:
if qtype == 'A' or qtype == 'AAAA':
retVal.append(((name, qtype), rdata.address))
Expand Down
2 changes: 1 addition & 1 deletion test/testspf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import yaml
except:
print("yaml can be found at http://pyyaml.org/")
print("Tested with PYYAML 3.04")
print("Tested with PYYAML 3.04 up to 5.1.2")
raise

zonedata = {}
Expand Down

0 comments on commit 5239c81

Please sign in to comment.