dev-python/pyrate-limiter: Bump to 3.6.0

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2024-03-18 05:58:37 +01:00
parent d1b7b57263
commit e66ef0b8de
2 changed files with 76 additions and 0 deletions
+1
View File
@@ -2,3 +2,4 @@ DIST pyrate-limiter-2.10.0.gh.tar.gz 71838 BLAKE2B 3b8fd16684268870991c3a731c549
DIST pyrate_limiter-3.2.1.tar.gz 277166 BLAKE2B eb126b94bc9a113addd1e727ae21ee2df447e1f9fc0b3a1b77ab46464186a0cb62584fafbc9fac1ddbcc7c3289338208dfb39070e57e974e00442b1d7c5f0d21 SHA512 cb782766c2e1e47aeb35c3d7d03f9a82862a53e73b5afdab1b8a255866392cf0636340164c19e4181e8aa4327e9c346fc2fde64b2f50aaf227dd60633038f7c7
DIST pyrate_limiter-3.3.0.tar.gz 278153 BLAKE2B df0e3aaf53150fb905be994c8bcc268e45bafddf795514eb8a6ee56da25e998b85336f48331a2720cbf501cb6feee806c9c17d99adcb4647979f6d79f960cc9f SHA512 ee2cc0c573c7b696e6a6444eca85b4e5c8315c291b6ab64ed5e60cfd54298cd9aca1efdbfb7a669b92f8169848c03287ecb0a3f50c9281a4bc15acfc1713e300
DIST pyrate_limiter-3.4.1.tar.gz 278251 BLAKE2B c1894a190d0d70134683723d8ffa2b216ebf724cd409e9cc25301b9a9d70d73cf1e4fc1c7bf48e661935cc6f2c530b9d45f96d7c86ce2a20ab0e47892093e6d3 SHA512 64c06abaf540e21e4b085062eff83f1f9d1710156c2d22c0180858c31f731733d9db69bdc56e48aaf4220d874d9c5253f506decd0ce3743c8fb8aa695a4ff6b4
DIST pyrate_limiter-3.6.0.tar.gz 280021 BLAKE2B 4ff5e115376cfb5d860c4cd6437ccbb323e40f96bb81a9933f6f648d029c0f3a1d6674e1a9e1c0309a7087a9d1eb670918ca60d3c960e8acab017e12ffa5c28e SHA512 1f7f92203be443c27e2825022462c51eec2e276a4e58afc129599eacde21da55ed8229b0e5c7af21e650eb896b22c73f5fd227f56c1455cbd8d506894fed73a9
@@ -0,0 +1,75 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( pypy3 python3_{10..12} )
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/pytest-asyncio[${PYTHON_USEDEP}]
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
)
"
EPYTEST_DESELECT=(
# Optional dependency redis-py-cluster not packaged
"tests/test_02.py::test_redis_cluster"
)
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 -p asyncio -p rerunfailures --reruns=5 -k "not postgres"
}