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 4D8EB15A7D9 for ; Thu, 16 Mar 2023 03:33:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94ABBE07F9; Thu, 16 Mar 2023 03:33:29 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BC6BE07F9 for ; Thu, 16 Mar 2023 03:33:29 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 93C4F340CD9 for ; Thu, 16 Mar 2023 03:33:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D65258E5 for ; Thu, 16 Mar 2023 03:33:25 +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: <1678936153.7373e6825424d983aafe0dbe1699e94d3da72210.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.10.1.ebuild X-VCS-Directories: dev-python/fakeredis/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 7373e6825424d983aafe0dbe1699e94d3da72210 X-VCS-Branch: master Date: Thu, 16 Mar 2023 03:33:25 +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: c617d816-7391-4d62-bd76-2290f213ba4e X-Archives-Hash: e0cfd96a48f6ee669ffc605301271841 commit: 7373e6825424d983aafe0dbe1699e94d3da72210 Author: Michał Górny gentoo org> AuthorDate: Thu Mar 16 03:09:13 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Mar 16 03:09:13 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7373e682 dev-python/fakeredis: Bump to 2.10.1 Signed-off-by: Michał Górny gentoo.org> dev-python/fakeredis/Manifest | 1 + dev-python/fakeredis/fakeredis-2.10.1.ebuild | 84 ++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/dev-python/fakeredis/Manifest b/dev-python/fakeredis/Manifest index 94cce147fa3d..83f2961e7935 100644 --- a/dev-python/fakeredis/Manifest +++ b/dev-python/fakeredis/Manifest @@ -1,2 +1,3 @@ DIST fakeredis-py-2.10.0.gh.tar.gz 160050 BLAKE2B 9c97abe80ca683cd068e3e8616b068c166f08f1b1eb360b76c57da4b9d68396a5dd6fb4152e92dcd73a1407c50e259db54ba5edd61bc2dca774672de84fcf2d3 SHA512 31df18ead5e2937a7a98297f4dc08790371968dd1fa6d9dfa54eb35ab27c2a4a88e2186c252c8a630e0e70fa04e67eccb68e687f9383b6770313cf8b79f6b3bc +DIST fakeredis-py-2.10.1.gh.tar.gz 159626 BLAKE2B 41d28b57c369273d96a985d6b47c8b162d1fc94c508daae12048e139c9d7bb9c44b39c95eb77cfb06d24cd1b44ccaa65f3d32f4976bfdda72e319d5da1cd69c4 SHA512 5659f5e3a6344448916bfe9ad88fff45b266488aa6d4e0b503f8594308ecfb8e97b1f588b658cb01a5dbe5fc06e64a1bbb6eafaa28aed0b8761b5e15638615ea DIST fakeredis-py-2.9.2.gh.tar.gz 165549 BLAKE2B 351e07976ed6a4d11429c83aefe3a0e2d4397a97fdb2904ab65ac4d2717d129f5ac018f071b8670012aabe127d87350f3285f6f86369bb4b7eadbd61da5774f7 SHA512 6e9ab0851f74ade2325aad88b86212b4052ca53a7510034cd888ef4080eec4129b226ab8c166ab09fa6e3d3b2c3c70fce8adafdb4081a4d3501fd4d9d5e04b84 diff --git a/dev-python/fakeredis/fakeredis-2.10.1.ebuild b/dev-python/fakeredis/fakeredis-2.10.1.ebuild new file mode 100644 index 000000000000..c382b83985f0 --- /dev/null +++ b/dev-python/fakeredis/fakeredis-2.10.1.ebuild @@ -0,0 +1,84 @@ +# 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]" + test/test_mixins/test_set_commands.py::test_smismember_wrong_type + ) + 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 +}