From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B28011582EF for ; Sun, 09 Mar 2025 14:58:26 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 7388E34308C for ; Sun, 09 Mar 2025 14:58:26 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 6F423110370; Sun, 09 Mar 2025 14:58:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 64DC9110370 for ; Sun, 09 Mar 2025 14:58:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 16E5D34308C for ; Sun, 09 Mar 2025 14:58:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0A37827E6 for ; Sun, 09 Mar 2025 14:58:23 +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: <1741532300.8e5f051fd9b89514c291456b96e7a5ed553bf162.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/fakeredis/files/, dev-python/fakeredis/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/fakeredis/fakeredis-2.27.0.ebuild dev-python/fakeredis/files/fakeredis-2.27.0-pypy.patch X-VCS-Directories: dev-python/fakeredis/ dev-python/fakeredis/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 8e5f051fd9b89514c291456b96e7a5ed553bf162 X-VCS-Branch: master Date: Sun, 09 Mar 2025 14:58:23 +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: eb8e9699-4210-40c2-9959-79b472b7a844 X-Archives-Hash: 666eaf8160570bc2010f1b33d286f9fe commit: 8e5f051fd9b89514c291456b96e7a5ed553bf162 Author: Michał Górny gentoo org> AuthorDate: Sun Mar 9 14:46:02 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Mar 9 14:58:20 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e5f051f dev-python/fakeredis: Enable pypy3.11 Signed-off-by: Michał Górny gentoo.org> dev-python/fakeredis/fakeredis-2.27.0.ebuild | 7 +++++- .../fakeredis/files/fakeredis-2.27.0-pypy.patch | 29 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/dev-python/fakeredis/fakeredis-2.27.0.ebuild b/dev-python/fakeredis/fakeredis-2.27.0.ebuild index 9eb948a30eb2..1921f6909742 100644 --- a/dev-python/fakeredis/fakeredis-2.27.0.ebuild +++ b/dev-python/fakeredis/fakeredis-2.27.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( pypy3 python3_{10..13} ) +PYTHON_COMPAT=( pypy3 pypy3_11 python3_{10..13} ) inherit distutils-r1 pypi @@ -38,6 +38,11 @@ BDEPEND=" distutils_enable_tests pytest src_prepare() { + local PATCHES=( + # https://github.com/cunla/fakeredis-py/pull/363 + "${FILESDIR}/${P}-pypy.patch" + ) + distutils-r1_src_prepare # https://github.com/cunla/fakeredis-py/issues/320 diff --git a/dev-python/fakeredis/files/fakeredis-2.27.0-pypy.patch b/dev-python/fakeredis/files/fakeredis-2.27.0-pypy.patch new file mode 100644 index 000000000000..72871a55f59f --- /dev/null +++ b/dev-python/fakeredis/files/fakeredis-2.27.0-pypy.patch @@ -0,0 +1,29 @@ +From 61fef9d6c144f34654bfaa596678696b0d78d229 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 9 Mar 2025 15:36:45 +0100 +Subject: [PATCH] fix: Fix `test_tcp_server_started` to close the connection + +Fix `test_tcp_server_started` to use a context manager, in order to +close the connection to the `TcpFakeServer` when done. Otherwise, +the test relies on GC closing the connection in order for the server +thread to finish -- which does not happen with PyPy, and causes `pytest` +to hang after running the test suite. +--- + test/test_tcp_server/test_connectivity.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/test_tcp_server/test_connectivity.py b/test/test_tcp_server/test_connectivity.py +index 414ed58..9a1f6f1 100644 +--- a/test/test_tcp_server/test_connectivity.py ++++ b/test/test_tcp_server/test_connectivity.py +@@ -17,7 +17,7 @@ def test_tcp_server_started(): + t = Thread(target=server.serve_forever, daemon=True) + t.start() + time.sleep(0.1) +- r = redis.Redis(host=server_address[0], port=server_address[1]) +- r.set("foo", "bar") +- assert r.get("foo") == b"bar" ++ with redis.Redis(host=server_address[0], port=server_address[1]) as r: ++ r.set("foo", "bar") ++ assert r.get("foo") == b"bar" + server.shutdown()