forked from pool/python-eventlet
- 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:
31
newdnspython.patch
Normal file
31
newdnspython.patch
Normal 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)
|
@@ -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>
|
||||
|
||||
|
@@ -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
|
||||
# Removes dependency on nose
|
||||
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 greenlet >= 0.3}
|
||||
BuildRequires: %{python_module monotonic >= 1.4}
|
||||
BuildRequires: %{python_module pyOpenSSL}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six >= 1.10.0}
|
||||
BuildRequires: %{python_module testsuite}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: netcfg
|
||||
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}
|
||||
|
||||
%check
|
||||
# All tests fail (gh#eventlet/eventlet#638)
|
||||
# All tests fail (gh#eventlet/eventlet#638), we are now on 8 errors
|
||||
%pytest || /bin/true
|
||||
|
||||
%files %{python_files}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -28,7 +28,7 @@ setuptools.setup(
|
||||
@@ -27,7 +27,7 @@ setuptools.setup(
|
||||
'README.rst'
|
||||
)
|
||||
).read(),
|
||||
@@ -19,7 +19,7 @@
|
||||
tests/openssl_test.py
|
||||
tests/os_test.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_urllib.py
|
||||
tests/stdlib/test_urllib2.py
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
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_address = ('127.0.0.1', sender.getsockname()[1])
|
||||
|
Reference in New Issue
Block a user