From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests/, dev-python/requests/files/
Date: Wed, 28 Jul 2021 09:08:04 +0000 (UTC) [thread overview]
Message-ID: <1627463279.c8005f10a737943a4e7a7d06ffd78fb71b2d09b4.mgorny@gentoo> (raw)
commit: c8005f10a737943a4e7a7d06ffd78fb71b2d09b4
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 28 08:56:04 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jul 28 09:07:59 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8005f10
dev-python/requests: Fix test failures due to listen(0)
Fix test failures on platforms (alpha, riscv) that literally interpret
listen(0) as 'zero connections allowed'.
Closes: https://bugs.gentoo.org/803515
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../requests/files/requests-2.26.0-test.patch | 30 ++++++++++++++++++++++
dev-python/requests/requests-2.26.0.ebuild | 4 +++
2 files changed, 34 insertions(+)
diff --git a/dev-python/requests/files/requests-2.26.0-test.patch b/dev-python/requests/files/requests-2.26.0-test.patch
new file mode 100644
index 00000000000..6bbf7887171
--- /dev/null
+++ b/dev-python/requests/files/requests-2.26.0-test.patch
@@ -0,0 +1,30 @@
+From 6552e5374c335d62ba960a74b5b978897c823376 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 28 Jul 2021 10:33:22 +0200
+Subject: [PATCH] Fix creating non-listening sockets in tests on some platforms
+
+Fix the listen() invocation for the test server not to pass a backlog
+value of zero. The value of zero means no backlog which effectively
+means that the socket can not accept any connections. This does not
+matter for the majority of platforms since the value is only advisory
+and the platform tends to go with a bigger backlog anyway. However,
+a few platforms (e.g. alpha or riscv Linux) do take the value literally,
+and therefore the tests fail since they are unable to connect to
+the server. Let Python use a 'default reasonable value' instead.
+---
+ tests/testserver/server.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/testserver/server.py b/tests/testserver/server.py
+index 132221f7c4..92dcb6cb1a 100644
+--- a/tests/testserver/server.py
++++ b/tests/testserver/server.py
+@@ -78,7 +78,7 @@ def run(self):
+ def _create_socket_and_bind(self):
+ sock = socket.socket()
+ sock.bind((self.host, self.port))
+- sock.listen(0)
++ sock.listen()
+ return sock
+
+ def _close_server_sock_ignore_errors(self):
diff --git a/dev-python/requests/requests-2.26.0.ebuild b/dev-python/requests/requests-2.26.0.ebuild
index 24926975d01..d7001ec67df 100644
--- a/dev-python/requests/requests-2.26.0.ebuild
+++ b/dev-python/requests/requests-2.26.0.ebuild
@@ -36,6 +36,10 @@ BDEPEND="
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}"/${P}-test.patch
+)
+
python_test() {
local deselect=(
# Internet
next reply other threads:[~2021-07-28 9:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 9:08 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-21 12:44 [gentoo-commits] repo/gentoo:master commit in: dev-python/requests/, dev-python/requests/files/ Michał Górny
2023-02-16 20:28 Michał Górny
2022-10-23 5:39 Michał Górny
2022-06-26 6:47 Sam James
2022-06-21 22:58 Sam James
2021-11-27 10:27 Michał Górny
2019-01-27 17:16 Virgil Dupras
2018-01-06 14:13 Michał Górny
2017-05-15 15:48 Manuel Rüger
2017-05-03 11:48 Manuel Rüger
2016-11-30 13:54 Lars Wendler
2016-01-21 11:43 Justin Lecher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1627463279.c8005f10a737943a4e7a7d06ffd78fb71b2d09b4.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox