Hello community,
here is the log from the commit of package python-py3dns for openSUSE:Factory checked in at 2019-09-11 10:39:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-py3dns (Old)
and /work/SRC/openSUSE:Factory/.python-py3dns.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-py3dns"
Wed Sep 11 10:39:37 2019 rev:2 rq:729886 version:3.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-py3dns/python-py3dns.changes 2018-08-03 12:37:56.379626419 +0200
+++ /work/SRC/openSUSE:Factory/.python-py3dns.new.7948/python-py3dns.changes 2019-09-11 10:39:38.867228021 +0200
@@ -1,0 +2,7 @@
+Tue Sep 10 12:56:30 UTC 2019 - Tomáš Chvátal
+
+- Update to 3.2.1:
+ * various minor fixes
+- Rebase patch python3-py3dns-handle-absent-resolv.patch
+
+-------------------------------------------------------------------
Old:
----
py3dns-3.2.0.tar.gz
New:
----
py3dns-3.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-py3dns.spec ++++++
--- /var/tmp/diff_new_pack.B1ehOO/_old 2019-09-11 10:39:39.439227919 +0200
+++ /var/tmp/diff_new_pack.B1ehOO/_new 2019-09-11 10:39:39.443227918 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-py3dns
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,14 +12,14 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-py3dns
-Version: 3.2.0
+Version: 3.2.1
Release: 0
Summary: Python module for DNS (Domain Name Service)
License: CNRI-Python
++++++ py3dns-3.2.0.tar.gz -> py3dns-3.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/CHANGES new/py3dns-3.2.1/CHANGES
--- old/py3dns-3.2.0/CHANGES 2018-07-23 23:27:00.000000000 +0200
+++ new/py3dns-3.2.1/CHANGES 2019-09-04 14:14:51.000000000 +0200
@@ -1,3 +1,12 @@
+3.2.1 Wed, Sep 4, 2019
+ * Add support for setting timeout for convenience methods in DNS.lazy
+ * Fixed DNS.req resulttype error format (LP: #1842423)
+ * Use errno.EADDRINUSE instead of the hard coded Linux value for improved
+ portability (LP: #1793540)
+ * Update test suite to correct for use of no longer existing DNS records
+ * Set timeout=1 for tests so testing with a non-responsive nameserver will
+ finish in a reasonable time
+
3.2.0 Mon, 23 Jul 2018
* Rename internal use of async since it is a reserved word in python3.7
(LP: #1776027)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/DNS/Base.py new/py3dns-3.2.1/DNS/Base.py
--- old/py3dns-3.2.0/DNS/Base.py 2018-07-23 22:47:25.000000000 +0200
+++ new/py3dns-3.2.1/DNS/Base.py 2019-09-04 12:19:11.000000000 +0200
@@ -12,6 +12,7 @@
"""
import socket, string, types, time, select
+import errno
from . import Type,Class,Opcode
import asyncore
#
@@ -212,8 +213,8 @@
self.s.bind(('', source_port))
break
except socket.error as msg:
- # Error 98, 'Address already in use'
- if msg.errno != 98: raise
+ # errno.EADDRINUSE, 'Address already in use'
+ if msg.errno != errno.EADDRINUSE: raise
def conn(self):
self.getSource()
@@ -285,7 +286,7 @@
# raise ArgumentError, 'reinitialize request before reuse'
try:
if self.args['resulttype']:
- raise ArgumentError('Restulttype {0} set with DNS.req, use DNS.qry to specify result type.'(format(self.args['resulttype'])))
+ raise ArgumentError('Restulttype {0} set with DNS.req, use DNS.qry to specify result type.'.format(self.args['resulttype']))
except:
# resulttype isn't set and that's what we want for DNS.req
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/DNS/__init__.py new/py3dns-3.2.1/DNS/__init__.py
--- old/py3dns-3.2.0/DNS/__init__.py 2018-07-23 22:55:44.000000000 +0200
+++ new/py3dns-3.2.1/DNS/__init__.py 2019-09-04 11:43:56.000000000 +0200
@@ -10,7 +10,7 @@
# __init__.py for DNS class.
-__version__ = '3.2.0'
+__version__ = '3.2.1'
try:
import ipaddress
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/DNS/lazy.py new/py3dns-3.2.1/DNS/lazy.py
--- old/py3dns-3.2.0/DNS/lazy.py 2018-07-23 22:27:51.000000000 +0200
+++ new/py3dns-3.2.1/DNS/lazy.py 2019-09-04 14:11:10.000000000 +0200
@@ -13,45 +13,47 @@
class NoDataError(IndexError): pass
class StatusError(IndexError): pass
-def revlookup(name):
+def revlookup(name,timeout=30):
"convenience routine for doing a reverse lookup of an address"
if Base.defaults['server'] == []: Base.DiscoverNameServers()
- names = revlookupall(name)
+ names = revlookupall(name, timeout)
if not names: return None
return names[0] # return shortest name
-def revlookupall(name):
+def revlookupall(name,timeout=30):
"convenience routine for doing a reverse lookup of an address"
# FIXME: check for IPv6
a = name.split('.')
a.reverse()
b = '.'.join(a)+'.in-addr.arpa'
- names = dnslookup(b, qtype = 'ptr')
+ qtype='ptr'
+ names = dnslookup(b, qtype, timeout)
# this will return all records.
names.sort(key=str.__len__)
return names
-def dnslookup(name,qtype):
+def dnslookup(name,qtype,timeout=30):
"convenience routine to return just answer data for any query type"
if Base.defaults['server'] == []: Base.DiscoverNameServers()
- result = Base.DnsRequest(name=name, qtype=qtype).req()
+ result = Base.DnsRequest(name=name, qtype=qtype).req(timeout=timeout)
if result.header['status'] != 'NOERROR':
raise ServerError("DNS query status: %s" % result.header['status'],
result.header['rcode'])
elif len(result.answers) == 0 and Base.defaults['server_rotate']:
# check with next DNS server
- result = Base.DnsRequest(name=name, qtype=qtype).req()
+ result = Base.DnsRequest(name=name, qtype=qtype).req(timeout=timeout)
if result.header['status'] != 'NOERROR':
raise ServerError("DNS query status: %s" % result.header['status'],
result.header['rcode'])
return [x['data'] for x in result.answers]
-def mxlookup(name):
+def mxlookup(name,timeout=30):
"""
convenience routine for doing an MX lookup of a name. returns a
sorted list of (preference, mail exchanger) records
"""
- l = dnslookup(name, qtype = 'mx')
+ qtype = 'mx'
+ l = dnslookup(name, qtype, timeout)
return l
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/DNS/tests/test_base.py new/py3dns-3.2.1/DNS/tests/test_base.py
--- old/py3dns-3.2.0/DNS/tests/test_base.py 2018-07-23 22:27:51.000000000 +0200
+++ new/py3dns-3.2.1/DNS/tests/test_base.py 2019-09-04 14:13:10.000000000 +0200
@@ -32,18 +32,18 @@
# try with asking for strings, and asking for bytes
dnsobj = DNS.DnsRequest('example.org')
- a_response = dnsobj.qry(qtype='A', resulttype='text')
+ a_response = dnsobj.qry(qtype='A', resulttype='text', timeout=1)
self.assertTrue(a_response.answers)
# is the result vaguely ipv4 like?
self.assertEqual(a_response.answers[0]['data'].count('.'), 3)
self.assertEqual(a_response.answers[0]['data'],'93.184.216.34')
# Default result type for .qry object is an ipaddress object
- ad_response = dnsobj.qry(qtype='A')
+ ad_response = dnsobj.qry(qtype='A', timeout=1)
self.assertTrue(ad_response.answers)
self.assertEqual(ad_response.answers[0]['data'],ipaddress.IPv4Address('93.184.216.34'))
- ab_response = dnsobj.qry(qtype='A', resulttype='binary')
+ ab_response = dnsobj.qry(qtype='A', resulttype='binary', timeout=1)
self.assertTrue(ab_response.answers)
# is the result ipv4 binary like?
self.assertEqual(len(ab_response.answers[0]['data']), 4)
@@ -51,7 +51,7 @@
assertIsByte(b)
self.assertEqual(ab_response.answers[0]['data'],b']\xb8\xd8\"')
- ai_response = dnsobj.qry(qtype='A', resulttype='integer')
+ ai_response = dnsobj.qry(qtype='A', resulttype='integer', timeout=1)
self.assertTrue(ai_response.answers)
self.assertEqual(ai_response.answers[0]['data'],1572395042)
@@ -59,18 +59,18 @@
def testDnsRequestAAAA(self):
dnsobj = DNS.DnsRequest('example.org')
- aaaa_response = dnsobj.qry(qtype='AAAA', resulttype='text')
+ aaaa_response = dnsobj.qry(qtype='AAAA', resulttype='text', timeout=1)
self.assertTrue(aaaa_response.answers)
# does the result look like an ipv6 address?
self.assertTrue(':' in aaaa_response.answers[0]['data'])
self.assertEqual(aaaa_response.answers[0]['data'],'2606:2800:220:1:248:1893:25c8:1946')
# default is returning ipaddress object
- aaaad_response = dnsobj.qry(qtype='AAAA')
+ aaaad_response = dnsobj.qry(qtype='AAAA', timeout=1)
self.assertTrue(aaaad_response.answers)
self.assertEqual(aaaad_response.answers[0]['data'],ipaddress.IPv6Address('2606:2800:220:1:248:1893:25c8:1946'))
- aaaab_response = dnsobj.qry(qtype='AAAA', resulttype='binary')
+ aaaab_response = dnsobj.qry(qtype='AAAA', resulttype='binary', timeout=1)
self.assertTrue(aaaab_response.answers)
# is it ipv6 looking?
self.assertEqual(len(aaaab_response.answers[0]['data']) , 16)
@@ -78,30 +78,30 @@
assertIsByte(b)
self.assertEqual(aaaab_response.answers[0]['data'],b'&\x06(\x00\x02 \x00\x01\x02H\x18\x93%\xc8\x19F')
# IPv6 decimal
- aaaai_response = dnsobj.qry(qtype='AAAA', resulttype='integer')
+ aaaai_response = dnsobj.qry(qtype='AAAA', resulttype='integer', timeout=1)
self.assertTrue(aaaai_response.answers)
self.assertEqual(aaaai_response.answers[0]['data'], 50542628918019813867414319910101719366)
def testDnsRequestEmptyMX(self):
dnsobj = DNS.DnsRequest('example.org')
- mx_empty_response = dnsobj.qry(qtype='MX')
+ mx_empty_response = dnsobj.qry(qtype='MX', timeout=1)
self.assertFalse(mx_empty_response.answers)
def testDnsRequestMX(self):
dnsobj = DNS.DnsRequest('ietf.org')
- mx_response = dnsobj.qry(qtype='MX')
+ mx_response = dnsobj.qry(qtype='MX', timeout=1)
self.assertTrue(mx_response.answers[0])
# is hard coding a remote address a good idea?
# I think it's unavoidable. - sk
self.assertEqual(mx_response.answers[0]['data'], (0, 'mail.ietf.org'))
- m = DNS.mxlookup('ietf.org')
+ m = DNS.mxlookup('ietf.org', timeout=1)
self.assertEqual(mx_response.answers[0]['data'], m[0])
def testDnsRequestSrv(self):
dnsobj = DNS.Request(qtype='srv')
- respdef = dnsobj.qry('_ldap._tcp.openldap.org')
+ respdef = dnsobj.qry('_ldap._tcp.openldap.org', timeout=1)
self.assertTrue(respdef.answers)
data = respdef.answers[0]['data']
self.assertEqual(len(data), 4)
@@ -109,9 +109,9 @@
self.assertTrue('openldap.org' in data[3])
def testDkimRequest(self):
- q = '20120113._domainkey.google.com'
+ q = '20161025._domainkey.google.com'
dnsobj = DNS.Request(q, qtype='txt')
- resp = dnsobj.qry()
+ resp = dnsobj.qry(timeout=1)
self.assertTrue(resp.answers)
# should the result be bytes or a string? (Bytes, we finally settled on bytes)
@@ -122,17 +122,17 @@
def testDNSRequestTXT(self):
dnsobj = DNS.DnsRequest('fail.kitterman.org')
- respdef = dnsobj.qry(qtype='TXT')
+ respdef = dnsobj.qry(qtype='TXT', timeout=1)
self.assertTrue(respdef.answers)
data = respdef.answers[0]['data']
self.assertEqual(data, [b'v=spf1 -all'])
- resptext = dnsobj.qry(qtype='TXT', resulttype='text')
+ resptext = dnsobj.qry(qtype='TXT', resulttype='text', timeout=1)
self.assertTrue(resptext.answers)
data = resptext.answers[0]['data']
self.assertEqual(data, ['v=spf1 -all'])
- respbin = dnsobj.qry(qtype='TXT', resulttype='binary')
+ respbin = dnsobj.qry(qtype='TXT', resulttype='binary', timeout=1)
self.assertTrue(respbin.answers)
data = respbin.answers[0]['data']
self.assertEqual(data, [b'\x0bv=spf1 -all'])
@@ -141,8 +141,8 @@
"""Can we lookup an internationalized domain name?"""
dnsobj = DNS.DnsRequest('xn--bb-eka.at')
unidnsobj = DNS.DnsRequest('öbb.at')
- a_resp = dnsobj.qry(qtype='A', resulttype='text')
- ua_resp = unidnsobj.qry(qtype='A', resulttype='text')
+ a_resp = dnsobj.qry(qtype='A', resulttype='text', timeout=1)
+ ua_resp = unidnsobj.qry(qtype='A', resulttype='text', timeout=1)
self.assertTrue(a_resp.answers)
self.assertTrue(ua_resp.answers)
self.assertEqual(ua_resp.answers[0]['data'],
@@ -151,7 +151,7 @@
def testNS(self):
"""Lookup NS record from SOA"""
dnsob = DNS.DnsRequest('kitterman.com')
- resp = dnsob.qry(qtype='SOA')
+ resp = dnsob.qry(qtype='SOA', timeout=1)
self.assertTrue(resp.answers)
primary = resp.answers[0]['data'][0]
self.assertEqual(primary, 'ns1.pairnic.com')
@@ -166,7 +166,7 @@
# try with asking for strings, and asking for bytes
dnsob = DNS.DnsRequest('example.org')
- ad_response = dnsob.req(qtype='A')
+ ad_response = dnsob.req(qtype='A', timeout=1)
self.assertTrue(ad_response.answers)
# is the result vaguely ipv4 like?
self.assertEqual(ad_response.answers[0]['data'].count('.'), 3)
@@ -176,7 +176,7 @@
dnsob = DNS.DnsRequest('example.org')
# default is returning binary instead of text
- aaaad_response = dnsob.req(qtype='AAAA')
+ aaaad_response = dnsob.req(qtype='AAAA', timeout=1)
self.assertTrue(aaaad_response.answers)
# does the result look like a binary ipv6 address?
self.assertEqual(len(aaaad_response.answers[0]['data']) , 16)
@@ -187,23 +187,23 @@
def testDnsRequestEmptyMXD(self):
dnsob = DNS.DnsRequest('example.org')
- mx_empty_response = dnsob.req(qtype='MX')
+ mx_empty_response = dnsob.req(qtype='MX', timeout=1)
self.assertFalse(mx_empty_response.answers)
def testDnsRequestMXD(self):
dnsob = DNS.DnsRequest('ietf.org')
- mx_response = dnsob.req(qtype='MX')
+ mx_response = dnsob.req(qtype='MX', timeout=1)
self.assertTrue(mx_response.answers[0])
# is hard coding a remote address a good idea?
# I think it's unavoidable. - sk
self.assertEqual(mx_response.answers[0]['data'], (0, 'mail.ietf.org'))
- m = DNS.mxlookup('ietf.org')
+ m = DNS.mxlookup('ietf.org', timeout=1)
self.assertEqual(mx_response.answers[0]['data'], m[0])
def testDnsRequestSrvD(self):
dnsob = DNS.Request(qtype='srv')
- respdef = dnsob.req('_ldap._tcp.openldap.org')
+ respdef = dnsob.req('_ldap._tcp.openldap.org', timeout=1)
self.assertTrue(respdef.answers)
data = respdef.answers[0]['data']
self.assertEqual(len(data), 4)
@@ -211,9 +211,9 @@
self.assertTrue('openldap.org' in data[3])
def testDkimRequestD(self):
- q = '20120113._domainkey.google.com'
+ q = '20161025._domainkey.google.com'
dnsob = DNS.Request(q, qtype='txt')
- resp = dnsob.req()
+ resp = dnsob.req(timeout=1)
self.assertTrue(resp.answers)
# should the result be bytes or a string? (Bytes, we finally settled on bytes)
@@ -224,7 +224,7 @@
def testDNSRequestTXTD(self):
dnsob = DNS.DnsRequest('fail.kitterman.org')
- respdef = dnsob.req(qtype='TXT')
+ respdef = dnsob.req(qtype='TXT', timeout=1)
self.assertTrue(respdef.answers)
data = respdef.answers[0]['data']
self.assertEqual(data, [b'v=spf1 -all'])
@@ -233,8 +233,8 @@
"""Can we lookup an internationalized domain name?"""
dnsob = DNS.DnsRequest('xn--bb-eka.at')
unidnsob = DNS.DnsRequest('öbb.at')
- a_resp = dnsob.req(qtype='A', resulttype='text')
- ua_resp = unidnsob.req(qtype='A', resulttype='text')
+ a_resp = dnsob.req(qtype='A', resulttype='text', timeout=1)
+ ua_resp = unidnsob.req(qtype='A', resulttype='text', timeout=1)
self.assertTrue(a_resp.answers)
self.assertTrue(ua_resp.answers)
self.assertEqual(ua_resp.answers[0]['data'],
@@ -243,11 +243,11 @@
def testNSD(self):
"""Lookup NS record from SOA"""
dnsob = DNS.DnsRequest('kitterman.com')
- resp = dnsob.req(qtype='SOA')
+ resp = dnsob.req(qtype='SOA', timeout=1)
self.assertTrue(resp.answers)
primary = resp.answers[0]['data'][0]
self.assertEqual(primary, 'ns1.pairnic.com')
- resp = dnsob.req(qtype='NS',server=primary,aa=1)
+ resp = dnsob.req(qtype='NS',server=primary,aa=1, timeout=1)
nslist = [x['data'].lower() for x in resp.answers]
nslist.sort()
self.assertEqual(nslist, ['ns1.pairnic.com', 'ns2.pairnic.com'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/PKG-INFO new/py3dns-3.2.1/PKG-INFO
--- old/py3dns-3.2.0/PKG-INFO 2018-07-23 23:31:51.000000000 +0200
+++ new/py3dns-3.2.1/PKG-INFO 2019-09-04 14:15:49.000000000 +0200
@@ -1,10 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: py3dns
-Version: 3.2.0
+Version: 3.2.1
Summary: Python 3 DNS library
Home-page: https://launchpad.net/py3dns
-Author: Scott Kitterman
-Author-email: scott@kitterman.com
+Author: Anthony Baxter and others
+Author-email: py3dns-hackers@lists.launchpad.net
+Maintainer: Scott Kitterman
+Maintainer-email: scott@kitterman.com
License: Python License
Description: Python 3 DNS library:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/py3dns.egg-info/PKG-INFO new/py3dns-3.2.1/py3dns.egg-info/PKG-INFO
--- old/py3dns-3.2.0/py3dns.egg-info/PKG-INFO 2018-07-23 23:31:50.000000000 +0200
+++ new/py3dns-3.2.1/py3dns.egg-info/PKG-INFO 2019-09-04 14:15:48.000000000 +0200
@@ -1,10 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: py3dns
-Version: 3.2.0
+Version: 3.2.1
Summary: Python 3 DNS library
Home-page: https://launchpad.net/py3dns
-Author: Scott Kitterman
-Author-email: scott@kitterman.com
+Author: Anthony Baxter and others
+Author-email: py3dns-hackers@lists.launchpad.net
+Maintainer: Scott Kitterman
+Maintainer-email: scott@kitterman.com
License: Python License
Description: Python 3 DNS library:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py3dns-3.2.0/setup.cfg new/py3dns-3.2.1/setup.cfg
--- old/py3dns-3.2.0/setup.cfg 2018-07-23 23:31:51.000000000 +0200
+++ new/py3dns-3.2.1/setup.cfg 2019-09-04 14:15:49.000000000 +0200
@@ -1,5 +1,4 @@
[egg_info]
-tag_date = 0
tag_build =
-tag_svn_revision = 0
+tag_date = 0
++++++ python3-py3dns-handle-absent-resolv.patch ++++++
--- /var/tmp/diff_new_pack.B1ehOO/_old 2019-09-11 10:39:39.491227909 +0200
+++ /var/tmp/diff_new_pack.B1ehOO/_new 2019-09-11 10:39:39.491227909 +0200
@@ -7,20 +7,20 @@
DNS/Base.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
-diff --git a/DNS/Base.py b/DNS/Base.py
-index 4a70613..b5d97c8 100644
---- a/DNS/Base.py
-+++ b/DNS/Base.py
-@@ -11,7 +11,7 @@ Changes for Python3 port © 2011-14 Scott Kitterman
+Index: py3dns-3.2.1/DNS/Base.py
+===================================================================
+--- py3dns-3.2.1.orig/DNS/Base.py
++++ py3dns-3.2.1/DNS/Base.py
+@@ -11,7 +11,7 @@ Changes for Python3 port © 2011-14 Scot
Base functionality. Request and Response classes, that sort of thing.
"""
-import socket, string, types, time, select
+import socket, string, types, time, select, warnings
+ import errno
from . import Type,Class,Opcode
import asyncore
- #
-@@ -49,8 +49,12 @@ defaults= { 'protocol':'udp', 'port':53, 'opcode':Opcode.QUERY,
+@@ -50,8 +50,12 @@ defaults= { 'protocol':'udp', 'port':53,
def ParseResolvConf(resolv_path="/etc/resolv.conf"):
"parses the /etc/resolv.conf file and sets defaults for name servers"
@@ -35,6 +35,3 @@
def ParseResolvConfFromIterable(lines):
"parses a resolv.conf formatted stream and sets defaults for name servers"
---
-2.9.3
-