From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 77414139337 for ; Wed, 28 Jul 2021 09:08:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0BE49E0870; Wed, 28 Jul 2021 09:08:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AAF78E086B for ; Wed, 28 Jul 2021 09:08:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 505E8342D34 for ; Wed, 28 Jul 2021 09:08:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA6587AF for ; Wed, 28 Jul 2021 09:08:04 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1627463279.c8005f10a737943a4e7a7d06ffd78fb71b2d09b4.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests/, dev-python/requests/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/requests/files/requests-2.26.0-test.patch dev-python/requests/requests-2.26.0.ebuild X-VCS-Directories: dev-python/requests/files/ dev-python/requests/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c8005f10a737943a4e7a7d06ffd78fb71b2d09b4 X-VCS-Branch: master Date: Wed, 28 Jul 2021 09:08:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: acf787d7-b817-4165-bd1c-84a9147c3b56 X-Archives-Hash: 88e83246ed2e8d4c87ef8a91e8e8b200 commit: c8005f10a737943a4e7a7d06ffd78fb71b2d09b4 Author: Michał Górny gentoo org> AuthorDate: Wed Jul 28 08:56:04 2021 +0000 Commit: Michał Górny gentoo 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 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?= +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