From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 76E6A15800A for ; Mon, 28 Aug 2023 16:53:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 89E252BC02C; Mon, 28 Aug 2023 16:53:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 703DC2BC028 for ; Mon, 28 Aug 2023 16:53:20 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6FC2340DCB for ; Mon, 28 Aug 2023 16:53:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 179BD10DA for ; Mon, 28 Aug 2023 16:53:17 +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: <1693241592.5bb094bf7e0bc1d13f46556b5a2ec6127d56c08c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyrate-limiter/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pyrate-limiter/Manifest dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild X-VCS-Directories: dev-python/pyrate-limiter/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 5bb094bf7e0bc1d13f46556b5a2ec6127d56c08c X-VCS-Branch: master Date: Mon, 28 Aug 2023 16:53:17 +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: 6a5bc1f0-aacc-4930-9d0e-e13d42794798 X-Archives-Hash: 92f8520b184e09fe15be33e8b924fd8a commit: 5bb094bf7e0bc1d13f46556b5a2ec6127d56c08c Author: Michał Górny gentoo org> AuthorDate: Mon Aug 28 16:33:16 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Aug 28 16:53:12 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bb094bf dev-python/pyrate-limiter: Bump to 3.1.0 Signed-off-by: Michał Górny gentoo.org> dev-python/pyrate-limiter/Manifest | 1 + .../pyrate-limiter/pyrate-limiter-3.1.0.ebuild | 73 ++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/dev-python/pyrate-limiter/Manifest b/dev-python/pyrate-limiter/Manifest index 048404f5c941..224a8f4aae48 100644 --- a/dev-python/pyrate-limiter/Manifest +++ b/dev-python/pyrate-limiter/Manifest @@ -1,2 +1,3 @@ DIST pyrate-limiter-2.10.0.gh.tar.gz 71838 BLAKE2B 3b8fd16684268870991c3a731c5497802c6f7be51e57bc983a14a7484fad2d0983613304fa061fdb70a3e6645d17fe37fbd68e9ddeca57bc7bd97fef4a5d8585 SHA512 b0090b2d80d40ba2f86ac7b5c5612a35fa885b52a87d783aa9726782275e79ca8d54a9a44b1f0dd43c98bf2355f4c17e1686d7c7f806934ea492b67f66b06ffe DIST pyrate_limiter-3.0.1.tar.gz 276145 BLAKE2B f7e861b4abb7269e38a7c4c75d6131c453ee0a8dc8fc48686571d22f87d3c95b0e7d3d1bf99c22966276a9949d60abc4edceadad3db93bf247947c4067dbf6a1 SHA512 4f0656e2f8d38319e58b36c4301860a7c326a2daac85d170dc951a14813dc6f0c7a4995b8bf12a354da6d9e192fdf80fa8d8ee4f77e429e8cfc6f5366a8e415c +DIST pyrate_limiter-3.1.0.tar.gz 276659 BLAKE2B 2858b2cbb4805f139ae1a26171e6a1c235eb2d8eb93380f10ed27db16e2983b01b83e7d72d4bf5b44b69710569687e86c1194ea3e1a5ff8750e5966faf5a5b6e SHA512 601b70a380965fc108ec110842170ea73065af38a809c8d103d5061948058590c6a228327ed425e1c69ef30d2c832cb8a61508d326eb3bcd6cbb2df813fa987e diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild new file mode 100644 index 000000000000..47947453dc89 --- /dev/null +++ b/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 multiprocessing 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-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ) +" + +EPYTEST_DESELECT=( + # Optional dependency redis-py-cluster not packaged + "tests/test_02.py::test_redis_cluster" + # Python 3.11 is slightly faster, leading to a non-critical failure here + "tests/test_concurrency.py::test_concurrency[ProcessPoolExecutor-SQLiteBucket]" +) + +# TODO: package sphinx-copybutton +# distutils_enable_sphinx docs \ +# dev-python/sphinx-autodoc-typehints \ +# 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() { + epytest -n "$(makeopts_jobs)" --dist=worksteal +}