From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 finch.gentoo.org (Postfix) with ESMTPS id D75B8158128 for ; Wed, 18 Jun 2025 10:38:16 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id BA53D341E75 for ; Wed, 18 Jun 2025 10:38:16 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id B60E11104D9; Wed, 18 Jun 2025 10:38:15 +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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A4AB51104D9 for ; Wed, 18 Jun 2025 10:38:15 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4C47B341E72 for ; Wed, 18 Jun 2025 10:38:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BC17229F4 for ; Wed, 18 Jun 2025 10:38:13 +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: <1750243088.a3587767cb3ea7f007865c1e7b19ae9ed7667bf0.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/django-redis/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/django-redis/Manifest dev-python/django-redis/django-redis-6.0.0.ebuild X-VCS-Directories: dev-python/django-redis/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a3587767cb3ea7f007865c1e7b19ae9ed7667bf0 X-VCS-Branch: master Date: Wed, 18 Jun 2025 10:38:13 +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: b3a7a0af-9048-451a-a76f-2a0fc2cd4779 X-Archives-Hash: b0adc7e6c9d46d062e3c5d6b7e35c6c7 commit: a3587767cb3ea7f007865c1e7b19ae9ed7667bf0 Author: Michał Górny gentoo org> AuthorDate: Wed Jun 18 05:53:05 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Jun 18 10:38:08 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3587767 dev-python/django-redis: Bump to 6.0.0 Signed-off-by: Michał Górny gentoo.org> dev-python/django-redis/Manifest | 1 + dev-python/django-redis/django-redis-6.0.0.ebuild | 103 ++++++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/dev-python/django-redis/Manifest b/dev-python/django-redis/Manifest index ac9c29bbbe25..54bf95ca08fa 100644 --- a/dev-python/django-redis/Manifest +++ b/dev-python/django-redis/Manifest @@ -1 +1,2 @@ DIST django-redis-5.4.0.tar.gz 52567 BLAKE2B f3ac670500dbe57d795905d10d3a63102c60de6b61e96af257c0e654cd7aa7dc2e70e512bad55ef4129dd11f60ceaaeeccf78b94486550a555a843e4dea98f1f SHA512 12eb85ee3ce2c8fcf013c804a630bd3eb943de0980d1f6d365b5b5ed762ab956db80329f3e170f330ccc5b9e6f178ffa7938b1880477b7fb609d2cc3680b984a +DIST django_redis-6.0.0.tar.gz 56904 BLAKE2B 795c285fde69dff4809323e7da2aa0d2720c5939ab68197cbc8ab2b3cf468397146d25791e46b148e0214ff25169a8ac9dac990befb07ade16ed695e4b28c7c0 SHA512 616f3a81d986c5958b2d2740ad1becbd304ed395b9907758fd80a1cf2a5457c8f66a158874ee4b416b85c3540dc45f4127587cdf15d7b884c624ab7e8f84272e diff --git a/dev-python/django-redis/django-redis-6.0.0.ebuild b/dev-python/django-redis/django-redis-6.0.0.ebuild new file mode 100644 index 000000000000..c7b93c7209bf --- /dev/null +++ b/dev-python/django-redis/django-redis-6.0.0.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Full featured redis cache backend for Django" +HOMEPAGE=" + https://github.com/jazzband/django-redis/ + https://pypi.org/project/django-redis/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + >=dev-python/django-4.2[${PYTHON_USEDEP}] + >=dev-python/redis-4.0.2[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-db/redis + dev-python/lz4[${PYTHON_USEDEP}] + dev-python/msgpack[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + ) +" + +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_prepare() { + sed -e '/--cov/d' \ + -e '/--no-cov/d' \ + -i setup.cfg || die + distutils-r1_src_prepare +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + # no clue why we need to set it explicitly + local -x DJANGO_SETTINGS_MODULE=settings.sqlite + # sqlite_zstd requires pyzstd + # the test suite only works with -n4 + # https://github.com/jazzband/django-redis/issues/777 + epytest -p xdist -n 4 -p pytest_mock -k "not sqlite_zstd" +} + +src_test() { + local redis_pid="${T}"/redis.pid + local redis_port=6379 + local redis_sock="${T}"/redis.sock + local redis_test_config=" + daemonize yes + pidfile ${redis_pid} + port ${redis_port} + unixsocket ${redis_sock} + bind 127.0.0.1 + logfile ${T}/redis.log + enable-debug-command yes + " + local sentinel_pid="${T}"/sentinel.pid + local sentinel_port=26379 + + # Spawn Redis itself for testing purposes + einfo "Spawning Redis" + einfo "NOTE: Port ${redis_port} must be free" + "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die + + # Also Redis sentinel + cat > "${T}"/sentinel.conf <<-EOF || die + # from docker/sentinel.conf + sentinel monitor default_service 127.0.0.1 ${redis_port} 1 + sentinel down-after-milliseconds default_service 3200 + sentinel failover-timeout default_service 10000 + + # for some reason, tests expect 127.0.0.1 too + sentinel monitor 127.0.0.1 127.0.0.1 ${redis_port} 1 + sentinel down-after-milliseconds 127.0.0.1 3200 + sentinel failover-timeout 127.0.0.1 10000 + + daemonize yes + pidfile ${sentinel_pid} + port ${sentinel_port} + logfile ${T}/sentinel.log + EOF + "${EPREFIX}"/usr/sbin/redis-sentinel "${T}"/sentinel.conf || die + + # Update the socket path, we don't want hardcoded /tmp + sed -e "s^/tmp/redis.sock^${redis_sock}^g" \ + -i tests/settings/sqlite_usock.py || die + + # Run the tests + distutils-r1_src_test + + # Clean up afterwards + kill "$(<"${sentinel_pid}")" "$(<"${redis_pid}")" || die +}