diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-12-15 08:52:30 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-12-18 22:17:21 -0800 |
commit | 1ae3d1fe6aea86e5d5cb3dbd35804d212f2a7220 (patch) | |
tree | 9b71878c85a6dd4e198a1d1fbdb95d892557330c /meta-python/recipes-devtools | |
parent | 70664268a41cd6893f18e48d0a1ba4fafc5a6955 (diff) | |
download | meta-openembedded-1ae3d1fe6aea86e5d5cb3dbd35804d212f2a7220.tar.gz |
python3-eventlet: backport a patch to remove distutils dependency
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools')
2 files changed, 79 insertions, 1 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 000000000..61a37d94e --- /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 | |||
diff --git a/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb b/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb index c1256661b..fe4d4f020 100644 --- a/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb +++ b/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb | |||
@@ -4,6 +4,7 @@ SECTION = "devel/python" | |||
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" |
6 | 6 | ||
7 | SRC_URI += "file://0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch" | ||
7 | SRC_URI[sha256sum] = "722803e7eadff295347539da363d68ae155b8b26ae6a634474d0a920be73cfda" | 8 | SRC_URI[sha256sum] = "722803e7eadff295347539da363d68ae155b8b26ae6a634474d0a920be73cfda" |
8 | 9 | ||
9 | inherit pypi setuptools3 | 10 | inherit pypi setuptools3 |
@@ -11,6 +12,5 @@ inherit pypi setuptools3 | |||
11 | RDEPENDS:${PN} += " \ | 12 | RDEPENDS:${PN} += " \ |
12 | ${PYTHON_PN}-dnspython \ | 13 | ${PYTHON_PN}-dnspython \ |
13 | ${PYTHON_PN}-six \ | 14 | ${PYTHON_PN}-six \ |
14 | ${PYTHON_PN}-distutils \ | ||
15 | ${PYTHON_PN}-greenlet \ | 15 | ${PYTHON_PN}-greenlet \ |
16 | " | 16 | " |