commit:     7373e6825424d983aafe0dbe1699e94d3da72210
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 16 03:09:13 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> 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 <mgorny <AT> 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-5[${PYTHON_USEDEP}]
+       >=dev-python/redis-4.2[${PYTHON_USEDEP}]
+       <dev-python/sortedcontainers-3[${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
+}

Reply via email to