From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1701260-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(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 3E36B15802D
	for <garchives@archives.gentoo.org>; Wed, 18 Dec 2024 07:27:40 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BFA7AE0844;
	Wed, 18 Dec 2024 07:27:37 +0000 (UTC)
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) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 5D2D9E07D9
	for <gentoo-commits@lists.gentoo.org>; Wed, 18 Dec 2024 07:27:35 +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 4D334340B57
	for <gentoo-commits@lists.gentoo.org>; Wed, 18 Dec 2024 07:27:34 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9CF1D1F64
	for <gentoo-commits@lists.gentoo.org>; Wed, 18 Dec 2024 07:27:32 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
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" <mgorny@gentoo.org>
Message-ID: <1734506841.e74c128c68832e2d5d9ed79a1773366c6f9327a8.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/fakeredis/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/fakeredis/Manifest dev-python/fakeredis/fakeredis-2.26.2.ebuild
X-VCS-Directories: dev-python/fakeredis/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: e74c128c68832e2d5d9ed79a1773366c6f9327a8
X-VCS-Branch: master
Date: Wed, 18 Dec 2024 07:27:32 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ecf0453d-444c-4650-8b9b-0369b0e24dbd
X-Archives-Hash: 8f4e1c604f553fc875db7728192e2566

commit:     e74c128c68832e2d5d9ed79a1773366c6f9327a8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 18 07:11:57 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec 18 07:27:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e74c128c

dev-python/fakeredis: Bump to 2.26.2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/fakeredis/Manifest                |  1 +
 dev-python/fakeredis/fakeredis-2.26.2.ebuild | 97 ++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest
index cc7c7d2a1271..8842af7fb68c 100644
--- a/dev-python/fakeredis/Manifest
+++ b/dev-python/fakeredis/Manifest
@@ -1 +1,2 @@
 DIST fakeredis-2.26.1.tar.gz 150240 BLAKE2B 4a3416731ba1c4d96b0a7fe4d1a4382fa4de6eac1f029a00bd84e8fbbb2fa2142ad3efe6140c062f19ed9d806899fadfa584ddd453df63ef30400d93863ea19e SHA512 04ba6ec80cf2b9b2bb80b4da37286b5751b1565458727ea116625b4599e6343be11db472a793f859c29c22d09c03f9ec6adc40f2a3204cd9803bc08cfe01e63b
+DIST fakeredis-2.26.2.tar.gz 150563 BLAKE2B 3def1db25e1bfe2bcc23dd0788963f57245c01d0e1810d6c36dac5186fc8024956cbb6be09667792ce5c55f015cce1f7fd12a2fe5c32a0eb8e305519bfa301fe SHA512 2316cdf555367103a83b36b52ebc1295918fe43ab158c0d9fa28fe8d159fe7d79f3b575c754ca4efde57007e88e1bd39b1dd4a8a8f6ef80ca034c615ce5031c0

diff --git a/dev-python/fakeredis/fakeredis-2.26.2.ebuild b/dev-python/fakeredis/fakeredis-2.26.2.ebuild
new file mode 100644
index 000000000000..7dfb54aa0658
--- /dev/null
+++ b/dev-python/fakeredis/fakeredis-2.26.2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Fake implementation of redis API for testing purposes"
+HOMEPAGE="
+	https://github.com/cunla/fakeredis-py/
+	https://pypi.org/project/fakeredis/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+RDEPEND="
+	dev-python/packaging[${PYTHON_USEDEP}]
+	>=dev-python/redis-4.3[${PYTHON_USEDEP}]
+	<dev-python/sortedcontainers-3[${PYTHON_USEDEP}]
+	>=dev-python/sortedcontainers-2[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-python/typing-extensions[${PYTHON_USEDEP}]
+	' 3.10)
+"
+BDEPEND="
+	test? (
+		dev-db/redis
+		dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+		dev-python/pytest-mock[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	distutils-r1_src_prepare
+
+	# https://github.com/cunla/fakeredis-py/issues/320
+	sed -i -e '/LICENSE/d' pyproject.toml || die
+}
+
+python_test() {
+	local EPYTEST_DESELECT=(
+		# also lupa
+		test/test_aioredis2.py::test_failed_script_error
+		# TODO
+		"test/test_fakeredis.py::test_set_get_nx[StrictRedis]"
+		"test/test_fakeredis.py::test_lpop_count[StrictRedis]"
+		"test/test_fakeredis.py::test_rpop_count[StrictRedis]"
+		"test/test_fakeredis.py::test_zadd_minus_zero[StrictRedis]"
+		"test/test_mixins/test_pubsub_commands.py::test_pubsub_channels[StrictRedis]"
+		test/test_mixins/test_set_commands.py::test_smismember_wrong_type
+		# new redis-server?
+		"test/test_mixins/test_pubsub_commands.py::test_pubsub_shardnumsub[StrictRedis]"
+		# json ext
+		test/test_json/test_json.py
+		test/test_json/test_json_arr_commands.py
+		# tdigest ext?
+		'test/test_mixins/test_server_commands.py::test_command[FakeStrictRedis]'
+	)
+	local EPYTEST_IGNORE=(
+		# these tests fail a lot...
+		test/test_hypothesis.py
+	)
+	local args=(
+		# tests requiring lupa (lua support)
+		-k 'not test_eval and not test_lua and not test_script'
+	)
+	# Note: this package is not xdist-friendly
+	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+	epytest -p asyncio -p pytest_mock "${args[@]}"
+}
+
+src_test() {
+	local redis_pid="${T}"/redis.pid
+	local redis_port=6390
+
+	einfo "Spawning Redis"
+	einfo "NOTE: Port ${redis_port} must be free"
+	"${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start redis server"
+		daemonize yes
+		pidfile ${redis_pid}
+		port ${redis_port}
+		bind 127.0.0.1
+	EOF
+
+	# Run the tests
+	distutils-r1_src_test
+
+	# Clean up afterwards
+	kill "$(<"${redis_pid}")" || die
+}