commit: 2c14cfd1ddb3b00255829fae1ddfd8ecc5f44bd9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 31 03:32:59 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 31 03:37:30 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c14cfd1
dev-python/pyrate-limiter: Bump to 3.9.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pyrate-limiter/Manifest | 1 +
.../pyrate-limiter/pyrate-limiter-3.9.0.ebuild | 74 ++++++++++++++++++++++
2 files changed, 75 insertions(+)
diff --git a/dev-python/pyrate-limiter/Manifest
b/dev-python/pyrate-limiter/Manifest
index 3c4576e2918c..c26cca4fa3e3 100644
--- a/dev-python/pyrate-limiter/Manifest
+++ b/dev-python/pyrate-limiter/Manifest
@@ -1,2 +1,3 @@
DIST pyrate_limiter-3.7.1.tar.gz 282141 BLAKE2B
c2d55704f8357cdbd48efacafed6c10bc3e28d80b1a4e3f847cf7d8e91f2aa5dd8dfca42bf00462cc1ecef70b5df9d4dfde1fa3c1fa4925c144260850ad8d61b
SHA512
e63436dbbf42935a23eb5f27ec6864727baca478bfc197a77aa76fb3f502b51a64bec3cad8707da259addb6d3a0bb34109497b637c5ac5db95e47a04822d34b7
DIST pyrate_limiter-3.8.1.tar.gz 283411 BLAKE2B
550ac2ff3f3bf9c727087a2807deaeff1a211549bf47336385d57dacdecc05afc41fae912ef208599fcb4972d632804cd71ca78f36100b3937644e2235698384
SHA512
6ca179c82a0a2da149ceca46ee0c873e437fad9094f1e26d355df5dff39a0feb46371616a51cc2ae6d688b35b65defbb53a9b7e61240e8a0b03d727949d8a1a1
+DIST pyrate_limiter-3.9.0.tar.gz 289308 BLAKE2B
46046dd69ea7d74cdd29e6194fc43154d58119a950fbf9e81b71809e92099caff446268acc99ee1d9bf9b8457ffccc26f042259de452df2e8fac5c67098678ef
SHA512
a9910349aade28b9adf6cace538931e838f367330d8717838f3eed48f56a52baf9eafa955094f8cd858c2cdab740dfcd1c2fd0e3ab98c6b56a9b0233a1e4470e
diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.9.0.ebuild
b/dev-python/pyrate-limiter/pyrate-limiter-3.9.0.ebuild
new file mode 100644
index 000000000000..7435a7cad960
--- /dev/null
+++ b/dev-python/pyrate-limiter/pyrate-limiter-3.9.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family"
+HOMEPAGE="
+ https://github.com/vutran1710/PyrateLimiter/
+ https://pypi.org/project/pyrate-limiter/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/filelock[${PYTHON_USEDEP}]
+ dev-python/redis[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+ test? (
+ dev-db/redis
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_DESELECT=(
+ # Optional dependency redis-py-cluster not packaged
+ "tests/test_02.py::test_redis_cluster"
+)
+EPYTEST_PLUGINS=( pytest-{asyncio,rerunfailures} )
+EPYTEST_RERUNS=5
+EPYTEST_XDIST=1
+
+distutils_enable_sphinx docs \
+ dev-python/sphinx-autodoc-typehints \
+ dev-python/sphinx-copybutton \
+ dev-python/furo \
+ dev-python/myst-parser \
+ dev-python/sphinxcontrib-apidoc
+distutils_enable_tests pytest
+
+src_test() {
+ local redis_pid="${T}"/redis.pid
+ local redis_port=6379
+
+ # Spawn Redis itself for testing purposes
+ 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 ::1
+ ${extra_conf}
+ EOF
+
+ # Run the tests
+ distutils-r1_src_test
+
+ # Clean up afterwards
+ kill "$(<"${redis_pid}")" || die
+}
+
+python_test() {
+ # postgres tests require psycopg-pool
+ epytest -k "not postgres"
+}