summaryrefslogtreecommitdiff
path: root/dev-python/valkey
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/valkey')
-rw-r--r--dev-python/valkey/Manifest2
-rw-r--r--dev-python/valkey/valkey-6.2.0.ebuild79
2 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/valkey/Manifest b/dev-python/valkey/Manifest
index 2bc1c3f8bc42..fe2ec3b9328a 100644
--- a/dev-python/valkey/Manifest
+++ b/dev-python/valkey/Manifest
@@ -1,2 +1,4 @@
DIST valkey-6.1.1.tar.gz 4601372 BLAKE2B 39702f8e13746bc2c88ca14c1dc4aab3ac4d0da9d8ddf1d6abce7175a22c8c152697dd79dfacfd307852507bf489e5d19233f6bed72a9cd37b24da27a02786a5 SHA512 27be566a06476d9230f7dedeb9565c80be2d9bb58bb189f309acb6f41e831ab433a716454498a35b5632aa8e87d88a729d0319b43faf4e21af465192cf6d617e
DIST valkey-6.1.1.tar.gz.provenance 9352 BLAKE2B 61725a035bc60c4be8b59b755d675d7f31dff6d874be10a438fe2b2fe439bc0623a3cce348e65e385307d07ebc5d9b36e0ff1b8cc3f99fd7b6c1fc2a35fc3fdf SHA512 58c58c4a1b7b145848e6836ba1173143f7fd0efc9669d542154c27e201d6fd25ce494d7ef0c602eb872df935627a5e8b5643de2004ae00460e3fe46f69c55e88
+DIST valkey-6.2.0.tar.gz 4596658 BLAKE2B d29d66e18ea752ce1337277c83eed4db34b68f3b3e7f5cc2926112e475526c4a091edd140580af0596e670c3189c04ec9fb80d20e59759a34a7d2f122eacad23 SHA512 f474afb11e7ee94e95179aa24d1b67ec54bfb74a9a2bfa3f6d286105958e1c9c10c8c482ddb5eee8cc639851040c89344a517b7a4994780c6c4e120b687fd5b3
+DIST valkey-6.2.0.tar.gz.provenance 9773 BLAKE2B d9a562b4524e0f2b743f0d73a3fe1a78ee86dc4e2b35c01a3fc9e64fc84ab13e3b72104a164e4f84d8d8f88a11f0f62e1ead2bef22d2a204dd678e1f2aef7da3 SHA512 de42f185f03c093ccb2d0e10db71cedb5e08bdece7cd74e45fc0a2f265a1ad4970da457f6d61f02a539c4072467d90d240d009403dd96f74e78c907415a8d5a3
diff --git a/dev-python/valkey/valkey-6.2.0.ebuild b/dev-python/valkey/valkey-6.2.0.ebuild
new file mode 100644
index 000000000000..89c4110ba288
--- /dev/null
+++ b/dev-python/valkey/valkey-6.2.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYPI_VERIFY_REPO=https://github.com/valkey-io/valkey-py
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python client for Valkey forked from redis-py"
+HOMEPAGE="
+ https://github.com/valkey-io/valkey-py/
+ https://pypi.org/project/valkey/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
+
+BDEPEND="
+ test? (
+ dev-db/valkey
+ dev-python/cachetools[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-{asyncio,timeout} )
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # requires cluster
+ tests/{,test_asyncio/}test_cache.py::TestSentinelLocalCache::test_get_from_cache
+ tests/{,test_asyncio/}'test_cache.py::TestSentinelLocalCache::test_cache_decode_response[sentinel_setup0]'
+ # unexpected commands (different valkey version?)
+ tests/test_commands.py::TestValkeyCommands::test_acl_getuser_setuser
+ # looks like upstream didn't bother updating the server name here
+ tests/test_commands.py::TestValkeyCommands::test_lolwut
+ )
+ local EPYTEST_IGNORE=(
+ # missing modules
+ tests/{,test_asyncio/}test_bloom.py
+ tests/{,test_asyncio/}test_json.py
+ tests/{,test_asyncio/}test_search.py
+ tests/{,test_asyncio/}test_timeseries.py
+ # missing SSL certificates
+ tests/test_asyncio/test_cluster.py
+ tests/test_ssl.py
+ )
+
+ # TODO: try to run more servers?
+ epytest --asyncio-mode=auto \
+ -m "not valkeymod and not onlycluster and not replica and not ssl"
+}
+
+src_test() {
+ local valkey_pid="${T}"/valkey.pid
+ local valkey_port=6379
+
+ # Spawn valkey itself for testing purposes
+ einfo "Spawning valkey"
+ einfo "NOTE: Port ${valkey_port} must be free"
+ "${EPREFIX}"/usr/sbin/valkey-server - <<- EOF || die "Unable to start valkey server"
+ daemonize yes
+ pidfile ${valkey_pid}
+ port ${valkey_port}
+ bind 127.0.0.1 ::1
+ enable-debug-command yes
+ enable-module-command yes
+ EOF
+
+ # Run the tests
+ distutils-r1_src_test
+
+ # Clean up afterwards
+ kill "$(<"${valkey_pid}")" || die
+}