On Thu, Dec 14, 2023 at 11:53 PM Alexander Kanavin
<[email protected]> wrote:
>
> Signed-off-by: Alexander Kanavin <[email protected]>
> ---
>  ...o-host-0-is-not-supported-on-OpenInd.patch | 78 +++++++++++++++++++
>  .../python/python3-eventlet_0.33.3.bb         |  2 +-
>  2 files changed, 79 insertions(+), 1 deletion(-)
>  create mode 100644 
> meta-python/recipes-devtools/python/python3-eventlet/0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch
>
> 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 @@
> +From ac2f960a50710bb257e87bed4e3c95a746f2a0fe Mon Sep 17 00:00:00 2001
> +From: Sergey Shepelev <[email protected]>
> +Date: Mon, 27 Mar 2023 22:07:15 +0300
> +Subject: [PATCH] tests: getaddrinfo(host, 0) is not supported on OpenIndiana
> + platform
> +
> +https://github.com/eventlet/eventlet/issues/791
> +
> +Upstream-Status: Backport

This status needs link to commit in upstream repo

> +Signed-off-by: Alexander Kanavin <[email protected]>
> +---
> + tests/greendns_test.py | 14 +++++++-------
> + 1 file changed, 7 insertions(+), 7 deletions(-)
> +
> +diff --git a/tests/greendns_test.py b/tests/greendns_test.py
> +index feab2b6..3802f44 100644
> +--- a/tests/greendns_test.py
> ++++ b/tests/greendns_test.py
> +@@ -613,14 +613,14 @@ class TestGetaddrinfo(tests.LimitedTestCase):
> +     def test_getaddrinfo_only_a_ans(self):
> +         greendns.resolve = _make_mock_resolve()
> +         greendns.resolve.add('example.com', '1.2.3.4')
> +-        res = greendns.getaddrinfo('example.com', 0)
> ++        res = greendns.getaddrinfo('example.com', None)
> +         addr = [('1.2.3.4', 0)] * len(res)
> +         assert addr == [ai[-1] for ai in res]
> +
> +     def test_getaddrinfo_only_aaaa_ans(self):
> +         greendns.resolve = _make_mock_resolve()
> +         greendns.resolve.add('example.com', 'dead:beef::1')
> +-        res = greendns.getaddrinfo('example.com', 0)
> ++        res = greendns.getaddrinfo('example.com', None)
> +         addr = [('dead:beef::1', 0, 0, 0)] * len(res)
> +         assert addr == [ai[-1] for ai in res]
> +
> +@@ -637,7 +637,7 @@ class TestGetaddrinfo(tests.LimitedTestCase):
> +         res.raises = greendns.dns.exception.Timeout
> +         greendns.resolver._resolver = res()
> +
> +-        result = greendns.getaddrinfo('example.com', 0, 0)
> ++        result = greendns.getaddrinfo('example.com', None, 0)
> +         addr = [('1.2.3.4', 0)] * len(result)
> +         assert addr == [ai[-1] for ai in result]
> +
> +@@ -654,7 +654,7 @@ class TestGetaddrinfo(tests.LimitedTestCase):
> +         res.raises = greendns.dns.exception.DNSException
> +         greendns.resolver._resolver = res()
> +
> +-        result = greendns.getaddrinfo('example.com', 0, 0)
> ++        result = greendns.getaddrinfo('example.com', None, 0)
> +         addr = [('1.2.3.4', 0)] * len(result)
> +         assert addr == [ai[-1] for ai in result]
> +
> +@@ -667,7 +667,7 @@ class TestGetaddrinfo(tests.LimitedTestCase):
> +         greendns.resolver._resolver = res()
> +
> +         with tests.assert_raises(socket.gaierror):
> +-            greendns.getaddrinfo('example.com', 0, 0)
> ++            greendns.getaddrinfo('example.com', None, 0)
> +
> +     def test_getaddrinfo_hosts_only_dns_error(self):
> +         hostsres = _make_mock_base_resolver()
> +@@ -678,13 +678,13 @@ class TestGetaddrinfo(tests.LimitedTestCase):
> +         greendns.resolver._resolver = res()
> +
> +         with tests.assert_raises(socket.gaierror):
> +-            greendns.getaddrinfo('example.com', 0, 0)
> ++            greendns.getaddrinfo('example.com', None, 0)
> +
> +     def test_canonname(self):
> +         greendns.resolve = _make_mock_resolve()
> +         greendns.resolve.add('host.example.com', '1.2.3.4')
> +         greendns.resolve_cname = self._make_mock_resolve_cname()
> +-        res = greendns.getaddrinfo('host.example.com', 0,
> ++        res = greendns.getaddrinfo('host.example.com', None,
> +                                    0, 0, 0, socket.AI_CANONNAME)
> +         assert res[0][3] == 'cname.example.com'
> +
> 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"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778"
>
> +SRC_URI += 
> "file://0001-tests-getaddrinfo-host-0-is-not-supported-on-OpenInd.patch"
>  SRC_URI[sha256sum] = 
> "722803e7eadff295347539da363d68ae155b8b26ae6a634474d0a920be73cfda"
>
>  inherit pypi setuptools3
> @@ -11,6 +12,5 @@ inherit pypi setuptools3
>  RDEPENDS:${PN} += " \
>         ${PYTHON_PN}-dnspython \
>         ${PYTHON_PN}-six \
> -       ${PYTHON_PN}-distutils \
>         ${PYTHON_PN}-greenlet \
>  "
> --
> 2.39.2
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107529): 
https://lists.openembedded.org/g/openembedded-devel/message/107529
Mute This Topic: https://lists.openembedded.org/mt/103186667/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to