From 599eb71e0213e0516c2a56a6936072621ddea5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 23 Mar 2026 05:20:38 +0100 Subject: [PATCH] dev-python/pyrate-limiter: Bump to 4.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/pyrate-limiter/Manifest | 2 + .../pyrate-limiter-4.1.0.ebuild | 77 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 dev-python/pyrate-limiter/pyrate-limiter-4.1.0.ebuild diff --git a/dev-python/pyrate-limiter/Manifest b/dev-python/pyrate-limiter/Manifest index 9f4f8487c7531..44d743137e079 100644 --- a/dev-python/pyrate-limiter/Manifest +++ b/dev-python/pyrate-limiter/Manifest @@ -1,2 +1,4 @@ DIST pyrate_limiter-4.0.2.tar.gz 301304 BLAKE2B 5a5d983513ec9e94098cec7f065d550b233a5b7f5296680a1af5b07f83f45a11b07d695451cfb8b636f20918c221d3d5a777e006be3640a6245c0de93a69c5be SHA512 c99a7a36c771376ee9ba9f02427452ef2d53ec53682fd494d21e35beb2b7f91e91f99dc384548bced8752ecede40041ebd1a678c28700c4aa3b12ddf9c75e538 DIST pyrate_limiter-4.0.2.tar.gz.provenance 9565 BLAKE2B a4adc53f55f5a5be12df5b621195738b9f48a182829aedc32bcca466bc0a8b7747bba6ccf39dd8c4a244cec061db2f8d7433812b978d93f1f04fb0357278da97 SHA512 6b18c26dec90f4540f6f233e59b316a85fec0b3989d3f899cc7472cc1682b95987c468e001516dbdcd9c82552c8697ba5d88855f74a8c3b5e370c7fac4345392 +DIST pyrate_limiter-4.1.0.tar.gz 306136 BLAKE2B ca1231e7033f755b60f03439a9cc023df0333c4bfef30632743530c6fc1679c9b3696580c44c83988829f21091bb46f1d1aa6d6384fe0ede95073b64cd94a2a9 SHA512 3ffae7a8412989d37ca4ac3f30e3ca7cd44f8491537767094205c22594bd5ce543c861712929cd618f73b047260148be02d160cc44f03f92788a6209a82ed3c8 +DIST pyrate_limiter-4.1.0.tar.gz.provenance 9604 BLAKE2B eb99bcf9e09d32392ece5bd072897850af7cc9b3d420e0bb1db4ce5c3a8f9e1a4e6f2fbcd7a97311df21cfaa7d1a885f6cf94fdff9d5d41f4fce71b1275c0bb6 SHA512 ef23e57f7fe5abf2d9c191088b51e9f25e7adc720e3dfe6db1aa2d701619a97b3917766c22798b1ec8eacb4e3ffc58c6fe667088979e7bab4d73b86b1214ca8c diff --git a/dev-python/pyrate-limiter/pyrate-limiter-4.1.0.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-4.1.0.ebuild new file mode 100644 index 0000000000000..473b2755c89b7 --- /dev/null +++ b/dev-python/pyrate-limiter/pyrate-limiter-4.1.0.ebuild @@ -0,0 +1,77 @@ +# 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/vutran1710/PyrateLimiter +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_TIMEOUT:=60}" +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" +}