diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-eventlet/0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-eventlet/0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-eventlet/0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch b/meta-python/recipes-devtools/python/python3-eventlet/0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch new file mode 100644 index 0000000000..61a37d94e7 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-eventlet/0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From ac2f960a50710bb257e87bed4e3c95a746f2a0fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergey Shepelev <temotor@gmail.com> | ||
3 | Date: Mon, 27 Mar 2023 22:07:15 +0300 | ||
4 | Subject: [PATCH] tests: getaddrinfo(host, 0) is not supported on OpenIndiana | ||
5 | platform | ||
6 | |||
7 | https://github.com/eventlet/eventlet/issues/791 | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | --- | ||
12 | tests/greendns_test.py | 14 +++++++------- | ||
13 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
14 | |||
15 | diff --git a/tests/greendns_test.py b/tests/greendns_test.py | ||
16 | index feab2b6..3802f44 100644 | ||
17 | --- a/tests/greendns_test.py | ||
18 | +++ b/tests/greendns_test.py | ||
19 | @@ -613,14 +613,14 @@ class TestGetaddrinfo(tests.LimitedTestCase): | ||
20 | def test_getaddrinfo_only_a_ans(self): | ||
21 | greendns.resolve = _make_mock_resolve() | ||
22 | greendns.resolve.add('example.com', '1.2.3.4') | ||
23 | - res = greendns.getaddrinfo('example.com', 0) | ||
24 | + res = greendns.getaddrinfo('example.com', None) | ||
25 | addr = [('1.2.3.4', 0)] * len(res) | ||
26 | assert addr == [ai[-1] for ai in res] | ||
27 | |||
28 | def test_getaddrinfo_only_aaaa_ans(self): | ||
29 | greendns.resolve = _make_mock_resolve() | ||
30 | greendns.resolve.add('example.com', 'dead:beef::1') | ||
31 | - res = greendns.getaddrinfo('example.com', 0) | ||
32 | + res = greendns.getaddrinfo('example.com', None) | ||
33 | addr = [('dead:beef::1', 0, 0, 0)] * len(res) | ||
34 | assert addr == [ai[-1] for ai in res] | ||
35 | |||
36 | @@ -637,7 +637,7 @@ class TestGetaddrinfo(tests.LimitedTestCase): | ||
37 | res.raises = greendns.dns.exception.Timeout | ||
38 | greendns.resolver._resolver = res() | ||
39 | |||
40 | - result = greendns.getaddrinfo('example.com', 0, 0) | ||
41 | + result = greendns.getaddrinfo('example.com', None, 0) | ||
42 | addr = [('1.2.3.4', 0)] * len(result) | ||
43 | assert addr == [ai[-1] for ai in result] | ||
44 | |||
45 | @@ -654,7 +654,7 @@ class TestGetaddrinfo(tests.LimitedTestCase): | ||
46 | res.raises = greendns.dns.exception.DNSException | ||
47 | greendns.resolver._resolver = res() | ||
48 | |||
49 | - result = greendns.getaddrinfo('example.com', 0, 0) | ||
50 | + result = greendns.getaddrinfo('example.com', None, 0) | ||
51 | addr = [('1.2.3.4', 0)] * len(result) | ||
52 | assert addr == [ai[-1] for ai in result] | ||
53 | |||
54 | @@ -667,7 +667,7 @@ class TestGetaddrinfo(tests.LimitedTestCase): | ||
55 | greendns.resolver._resolver = res() | ||
56 | |||
57 | with tests.assert_raises(socket.gaierror): | ||
58 | - greendns.getaddrinfo('example.com', 0, 0) | ||
59 | + greendns.getaddrinfo('example.com', None, 0) | ||
60 | |||
61 | def test_getaddrinfo_hosts_only_dns_error(self): | ||
62 | hostsres = _make_mock_base_resolver() | ||
63 | @@ -678,13 +678,13 @@ class TestGetaddrinfo(tests.LimitedTestCase): | ||
64 | greendns.resolver._resolver = res() | ||
65 | |||
66 | with tests.assert_raises(socket.gaierror): | ||
67 | - greendns.getaddrinfo('example.com', 0, 0) | ||
68 | + greendns.getaddrinfo('example.com', None, 0) | ||
69 | |||
70 | def test_canonname(self): | ||
71 | greendns.resolve = _make_mock_resolve() | ||
72 | greendns.resolve.add('host.example.com', '1.2.3.4') | ||
73 | greendns.resolve_cname = self._make_mock_resolve_cname() | ||
74 | - res = greendns.getaddrinfo('host.example.com', 0, | ||
75 | + res = greendns.getaddrinfo('host.example.com', None, | ||
76 | 0, 0, 0, socket.AI_CANONNAME) | ||
77 | assert res[0][3] == 'cname.example.com' | ||
78 | |||