14
0

- Add newdnspython.patch which makes eventlet work with new

dnspython 2.0.0.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=71
This commit is contained in:
2020-08-14 21:30:58 +00:00
committed by Git OBS Bridge
parent f42a7f63a7
commit 1f4253786d
4 changed files with 45 additions and 4 deletions

31
newdnspython.patch Normal file
View File

@@ -0,0 +1,31 @@
--- a/eventlet/support/greendns.py
+++ b/eventlet/support/greendns.py
@@ -313,7 +313,7 @@ class ResolverProxy(object):
self.clear()
def clear(self):
- self._resolver = dns.resolver.Resolver(filename=self._filename)
+ self._resolver = dns.resolver.Resolver(filename=self._filename, configure=False)
self._resolver.cache = dns.resolver.LRUCache()
def query(self, qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
--- a/tests/greendns_test.py
+++ b/tests/greendns_test.py
@@ -885,7 +885,7 @@ class TinyDNSTests(tests.LimitedTestCase
# https://github.com/eventlet/eventlet/issues/499
# None means we don't want the server to find the IP
with tests.dns_tcp_server(None) as dnsaddr:
- resolver = Resolver()
+ resolver = Resolver(configure=False)
resolver.nameservers = [dnsaddr[0]]
resolver.nameserver_ports[dnsaddr[0]] = dnsaddr[1]
@@ -896,7 +896,7 @@ class TinyDNSTests(tests.LimitedTestCase
# https://github.com/eventlet/eventlet/issues/499
expected_ip = "192.168.1.1"
with tests.dns_tcp_server(expected_ip) as dnsaddr:
- resolver = Resolver()
+ resolver = Resolver(configure=False)
resolver.nameservers = [dnsaddr[0]]
resolver.nameserver_ports[dnsaddr[0]] = dnsaddr[1]
response = resolver.query('host.example.com', 'a', tcp=True)

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 14 21:30:16 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add newdnspython.patch which makes eventlet work with new
dnspython 2.0.0.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 13 16:07:08 UTC 2020 - Matej Cepl <mcepl@suse.com> Thu Aug 13 16:07:08 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@@ -28,12 +28,16 @@ Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventl
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com # PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com
# Removes dependency on nose # Removes dependency on nose
Patch0: remove_nose.patch Patch0: remove_nose.patch
# PATCH-FIX-UPSTREAM newdnspythis patch makes things totally awesomethon.patch gh#eventlet/eventlet#638 mcepl@suse.com
# patch is from gh#rthalley/dnspython#519
Patch1: newdnspython.patch
BuildRequires: %{python_module dnspython >= 1.15.0} BuildRequires: %{python_module dnspython >= 1.15.0}
BuildRequires: %{python_module greenlet >= 0.3} BuildRequires: %{python_module greenlet >= 0.3}
BuildRequires: %{python_module monotonic >= 1.4} BuildRequires: %{python_module monotonic >= 1.4}
BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10.0} BuildRequires: %{python_module six >= 1.10.0}
BuildRequires: %{python_module testsuite}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: netcfg BuildRequires: netcfg
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
@@ -73,7 +77,7 @@ sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
# All tests fail (gh#eventlet/eventlet#638) # All tests fail (gh#eventlet/eventlet#638), we are now on 8 errors
%pytest || /bin/true %pytest || /bin/true
%files %{python_files} %files %{python_files}

View File

@@ -1,6 +1,6 @@
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -28,7 +28,7 @@ setuptools.setup( @@ -27,7 +27,7 @@ setuptools.setup(
'README.rst' 'README.rst'
) )
).read(), ).read(),
@@ -19,7 +19,7 @@
tests/openssl_test.py tests/openssl_test.py
tests/os_test.py tests/os_test.py
tests/parse_results.py tests/parse_results.py
@@ -269,4 +268,4 @@ tests/stdlib/test_threading_local.py @@ -270,4 +269,4 @@ tests/stdlib/test_threading_local.py
tests/stdlib/test_timeout.py tests/stdlib/test_timeout.py
tests/stdlib/test_urllib.py tests/stdlib/test_urllib.py
tests/stdlib/test_urllib2.py tests/stdlib/test_urllib2.py
@@ -46,7 +46,7 @@
def min_buf_size(): def min_buf_size():
@@ -671,8 +669,8 @@ class TestGreenSocket(tests.LimitedTestC @@ -674,8 +672,8 @@ class TestGreenSocket(tests.LimitedTestC
sender.sendto(b'second', 0, address) sender.sendto(b'second', 0, address)
sender_address = ('127.0.0.1', sender.getsockname()[1]) sender_address = ('127.0.0.1', sender.getsockname()[1])