commit: c75ccf663c10595c868412ae488edc64c6ebf5eb
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 24 03:28:37 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 24 03:32:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c75ccf66
dev-python/pyrate-limiter: Bump to 3.8.1
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pyrate-limiter/Manifest | 1 +
.../pyrate-limiter/pyrate-limiter-3.8.1.ebuild | 74 ++++++++++++++++++++++
2 files changed, 75 insertions(+)
diff --git a/dev-python/pyrate-limiter/Manifest
b/dev-python/pyrate-limiter/Manifest
index c316c815fe48..3c4576e2918c 100644
--- a/dev-python/pyrate-limiter/Manifest
+++ b/dev-python/pyrate-limiter/Manifest
@@ -1 +1,2 @@
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
diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.8.1.ebuild
b/dev-python/pyrate-limiter/pyrate-limiter-3.8.1.ebuild
new file mode 100644
index 000000000000..3db72281a71f
--- /dev/null
+++ b/dev-python/pyrate-limiter/pyrate-limiter-3.8.1.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_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() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ # postgres tests require psycopg-pool
+ epytest --reruns=5 -k "not postgres"
+}