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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 14A0A15800F for ; Mon, 20 Feb 2023 15:22:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 174AEE0AE8; Mon, 20 Feb 2023 15:22:36 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 pigeon.gentoo.org (Postfix) with ESMTPS id D9543E0AE8 for ; Mon, 20 Feb 2023 15:22: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 EE8A8340CBB for ; Mon, 20 Feb 2023 15:22:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21C147D0 for ; Mon, 20 Feb 2023 15:22:33 +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: <1676906528.84081b95d12c6468e82526362c299cccf79a21c7.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.9.1.ebuild X-VCS-Directories: dev-python/fakeredis/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 84081b95d12c6468e82526362c299cccf79a21c7 X-VCS-Branch: master Date: Mon, 20 Feb 2023 15:22:33 +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: 90aafac2-1943-4646-b021-916e0f7bc4cc X-Archives-Hash: 38221a5ba8a8295e84bd72cde7f793ee commit: 84081b95d12c6468e82526362c299cccf79a21c7 Author: Michał Górny gentoo org> AuthorDate: Mon Feb 20 14:54:31 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Feb 20 15:22:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84081b95 dev-python/fakeredis: Bump to 2.9.1 Signed-off-by: Michał Górny gentoo.org> dev-python/fakeredis/Manifest | 1 + dev-python/fakeredis/fakeredis-2.9.1.ebuild | 83 +++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest index d98c71f92844..13104fc3e1f7 100644 --- a/dev-python/fakeredis/Manifest +++ b/dev-python/fakeredis/Manifest @@ -1,2 +1,3 @@ DIST fakeredis-py-2.6.0.gh.tar.gz 151925 BLAKE2B 60538efa5de93436177aa019908f02affb9df9b2aaf1349e933da6f066f98aaa255bbdb3297645ad1dc3b67a57a61bb8081e476f451799b512719f5779c1218d SHA512 19a23be7a182f962e66686f3c4ec3a5b9fbc847d97e48f19fde11ae268f4a70de567ff2ca302a9fe0e7080de2215698cf5b2ff2febda5eef6748f3ec8d601720 DIST fakeredis-py-2.9.0.gh.tar.gz 165442 BLAKE2B e71780b273f1847454d0e6e89f3f97a9d4a81d86345857fced39413521202f299b90c8a218f12b15d79a3bb7c865d7b0280798920cfd93120a553511b3a343ff SHA512 2ddf2570e7f00647834f8f07a3fef6ec68d630ff93ddd5375dcc47a14a5a7bf430dbc4a1abfb38fa2b5e18f1aa1f4ef5413b39c4bb3ed9d167aa1729edfa9870 +DIST fakeredis-py-2.9.1.gh.tar.gz 165449 BLAKE2B 6d0b6937a460d5fd27270df5e2d88c332f4ab42e97430fc7efd5777e35051fd44f6ab01b013637ee17bccada199e126075e2efd5fa7e3fd0112739e0e14f3c31 SHA512 bf18454ec2ab62e49b4b3f93d494d7648b1b82d9ec3720e7418767dc4acdfc89e86df8ec1b9814ac69fb4b6fa13d25f2ed3a62f82f479d6614a994904f97f249 diff --git a/dev-python/fakeredis/fakeredis-2.9.1.ebuild b/dev-python/fakeredis/fakeredis-2.9.1.ebuild new file mode 100644 index 000000000000..11e604ae7bad --- /dev/null +++ b/dev-python/fakeredis/fakeredis-2.9.1.ebuild @@ -0,0 +1,83 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +PYTHON_COMPAT=( pypy3 python3_{9..11} ) + +inherit distutils-r1 + +MY_P=fakeredis-py-${PV} +DESCRIPTION="Fake implementation of redis API for testing purposes" +HOMEPAGE=" + https://github.com/cunla/fakeredis-py/ + https://pypi.org/project/fakeredis/ +" +SRC_URI=" + https://github.com/cunla/fakeredis-py/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND=" + =dev-python/redis-4.2[${PYTHON_USEDEP}] + =dev-python/sortedcontainers-2.4.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-db/redis + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +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]" + ) + 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' + ) + epytest "${args[@]}" +} + +src_test() { + local redis_pid="${T}"/redis.pid + local redis_port=6379 + + 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 +}