From 5c9b04892554e5e14eb06acbf78da33e134ce789 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 13 Dec 2024 10:57:44 -0500 Subject: [PATCH] testing/py3-limits: upgrade to 3.14.1 --- backports/APKBUILD | 58 +++++++++++++++++++ backports/our-std-is-good-enough.patch | 11 ++++ backports/py3-limits/APKBUILD | 15 +++-- .../py3-limits/our-std-is-good-enough.patch | 13 +---- .../tests-drop-etcd3-and-k-argument.patch | 24 ++++++++ .../tests-drop-etcd3-and-k-argument.patch | 24 ++++++++ 6 files changed, 127 insertions(+), 18 deletions(-) create mode 100644 backports/APKBUILD create mode 100644 backports/our-std-is-good-enough.patch create mode 100644 backports/py3-limits/tests-drop-etcd3-and-k-argument.patch create mode 100644 backports/tests-drop-etcd3-and-k-argument.patch diff --git a/backports/APKBUILD b/backports/APKBUILD new file mode 100644 index 0000000..af4516d --- /dev/null +++ b/backports/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: lauren n. liberda +# Maintainer: lauren n. liberda +pkgname=py3-limits +pkgver=3.14.1 +pkgrel=0 +pkgdesc="Rate limiting using various strategies and storage backends such as redis & memcached" +url="https://github.com/alisaifee/limits" +arch="noarch" +license="MIT" +depends=" + py3-deprecated + python3 + " +makedepends="py3-setuptools py3-gpep517" +checkdepends=" + py3-flaky + py3-mongo + py3-pytest + py3-pytest-asyncio + py3-pytest-benchmark + py3-pytest-cov + py3-pytest-lazy-fixtures + py3-pymemcache + py3-redis + " +subpackages="$pkgname-pyc" +source=" + https://github.com/alisaifee/limits/archive/refs/tags/$pkgver/limits-$pkgver.tar.gz + + our-std-is-good-enough.patch + tests-drop-etcd3-and-k-argument.patch + " +builddir="$srcdir/limits-$pkgver" + +build() { + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 +} + +check() { + python3 -m venv --clear --without-pip --system-site-packages .testenv + gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl + .testenv/bin/python3 -m pytest -W ignore::DeprecationWarning \ + -m 'not benchmark and not etcd and not integration and not memcached' \ + -k 'not aio and not Storage and not strategy' -v +} + +package() { + gpep517 install-wheel --destdir "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +f30c7ec19c2d1edad9ed77dc590ae35717efa3956a4d97e465793e1923a4af08dc9921d90ee95d3c54ce3364b867ca67a9de62c61d627e07a3f50da20bdabd0f limits-3.14.1.tar.gz +271e3b0501f9f144eda8d2e96c93b285714e339b9217385e38cdbce1f4dec88f9c949e9419f8be94885092e7977f7dca29b86b5499e9fead678b42a686c337db our-std-is-good-enough.patch +e84f4db49349a6feba0f701b9d4357c5f66d64c4a23f8ce512528b0f44b5bbef55041c02d92aae3a4cc8d5340846f9e909217beb869a5aeb49df166dd29ae9e3 tests-drop-etcd3-and-k-argument.patch +" diff --git a/backports/our-std-is-good-enough.patch b/backports/our-std-is-good-enough.patch new file mode 100644 index 0000000..32d7d73 --- /dev/null +++ b/backports/our-std-is-good-enough.patch @@ -0,0 +1,11 @@ +--- ./limits/typing.py.orig ++++ ./limits/typing.py +@@ -13,7 +13,7 @@ + Union, + ) + +-from typing_extensions import ClassVar, Counter, ParamSpec, Protocol, TypeAlias ++from typing import ClassVar, Counter, ParamSpec, Protocol, TypeAlias + + Serializable = Union[int, str, float] + diff --git a/backports/py3-limits/APKBUILD b/backports/py3-limits/APKBUILD index 814a4bd..af4516d 100644 --- a/backports/py3-limits/APKBUILD +++ b/backports/py3-limits/APKBUILD @@ -1,8 +1,8 @@ # Contributor: lauren n. liberda # Maintainer: lauren n. liberda pkgname=py3-limits -pkgver=3.13.0 -pkgrel=1 +pkgver=3.14.1 +pkgrel=0 pkgdesc="Rate limiting using various strategies and storage backends such as redis & memcached" url="https://github.com/alisaifee/limits" arch="noarch" @@ -19,14 +19,16 @@ checkdepends=" py3-pytest-asyncio py3-pytest-benchmark py3-pytest-cov + py3-pytest-lazy-fixtures + py3-pymemcache py3-redis " subpackages="$pkgname-pyc" -options="!check" # most tests are integration with db connections, assume all connectors installed source=" https://github.com/alisaifee/limits/archive/refs/tags/$pkgver/limits-$pkgver.tar.gz our-std-is-good-enough.patch + tests-drop-etcd3-and-k-argument.patch " builddir="$srcdir/limits-$pkgver" @@ -39,7 +41,7 @@ build() { check() { python3 -m venv --clear --without-pip --system-site-packages .testenv gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl - .testenv/bin/python3 -m pytest \ + .testenv/bin/python3 -m pytest -W ignore::DeprecationWarning \ -m 'not benchmark and not etcd and not integration and not memcached' \ -k 'not aio and not Storage and not strategy' -v } @@ -50,6 +52,7 @@ package() { } sha512sums=" -0a13d08001c2f95e559ac1be35fa8cc178ad2d41bd5bf7b7e85781a428f550c350c21b92942b5b7e45f0f4c0604e96e579c8a26b5e9ca1196e6605608721030a limits-3.13.0.tar.gz -0364d51f9f879b95c6a4a3c9e9fd3d7d1e15ea214c50ae98cd36826b8c0b2d903cf1128741ac83738e305a207dae8955a0b2c8679484d2d6643e334595bdb1d7 our-std-is-good-enough.patch +f30c7ec19c2d1edad9ed77dc590ae35717efa3956a4d97e465793e1923a4af08dc9921d90ee95d3c54ce3364b867ca67a9de62c61d627e07a3f50da20bdabd0f limits-3.14.1.tar.gz +271e3b0501f9f144eda8d2e96c93b285714e339b9217385e38cdbce1f4dec88f9c949e9419f8be94885092e7977f7dca29b86b5499e9fead678b42a686c337db our-std-is-good-enough.patch +e84f4db49349a6feba0f701b9d4357c5f66d64c4a23f8ce512528b0f44b5bbef55041c02d92aae3a4cc8d5340846f9e909217beb869a5aeb49df166dd29ae9e3 tests-drop-etcd3-and-k-argument.patch " diff --git a/backports/py3-limits/our-std-is-good-enough.patch b/backports/py3-limits/our-std-is-good-enough.patch index 94c0c30..32d7d73 100644 --- a/backports/py3-limits/our-std-is-good-enough.patch +++ b/backports/py3-limits/our-std-is-good-enough.patch @@ -1,14 +1,3 @@ ---- ./limits/util.py.orig -+++ ./limits/util.py -@@ -8,7 +8,7 @@ - from types import ModuleType - from typing import TYPE_CHECKING, cast - --import importlib_resources -+from importlib import resources as importlib_resources - from packaging.version import Version - - from limits.typing import Dict, List, NamedTuple, Optional, Tuple, Type, Union --- ./limits/typing.py.orig +++ ./limits/typing.py @@ -13,7 +13,7 @@ @@ -19,4 +8,4 @@ +from typing import ClassVar, Counter, ParamSpec, Protocol, TypeAlias Serializable = Union[int, str, float] - + diff --git a/backports/py3-limits/tests-drop-etcd3-and-k-argument.patch b/backports/py3-limits/tests-drop-etcd3-and-k-argument.patch new file mode 100644 index 0000000..cab3a06 --- /dev/null +++ b/backports/py3-limits/tests-drop-etcd3-and-k-argument.patch @@ -0,0 +1,24 @@ +diff --git a/tests/conftest.py.orig b/tests/conftest.py +index 2aeb758dda6..a9b2b8b2bd1 100644 +--- a/tests/conftest.py.orig ++++ b/tests/conftest.py +@@ -3,7 +3,6 @@ import platform + import socket + import time + +-import etcd3 + import pymemcache + import pymemcache.client + import pymongo +diff --git a/pytest.ini.orig b/pytest.ini +index 38c40a713d0..8c6659e21c2 100644 +--- a/pytest.ini.orig ++++ b/pytest.ini +@@ -17,7 +17,6 @@ addopts = + -rfEsxX + --cov=limits + -m "not benchmark" +- -K + filterwarnings = + error + module::ResourceWarning diff --git a/backports/tests-drop-etcd3-and-k-argument.patch b/backports/tests-drop-etcd3-and-k-argument.patch new file mode 100644 index 0000000..cab3a06 --- /dev/null +++ b/backports/tests-drop-etcd3-and-k-argument.patch @@ -0,0 +1,24 @@ +diff --git a/tests/conftest.py.orig b/tests/conftest.py +index 2aeb758dda6..a9b2b8b2bd1 100644 +--- a/tests/conftest.py.orig ++++ b/tests/conftest.py +@@ -3,7 +3,6 @@ import platform + import socket + import time + +-import etcd3 + import pymemcache + import pymemcache.client + import pymongo +diff --git a/pytest.ini.orig b/pytest.ini +index 38c40a713d0..8c6659e21c2 100644 +--- a/pytest.ini.orig ++++ b/pytest.ini +@@ -17,7 +17,6 @@ addopts = + -rfEsxX + --cov=limits + -m "not benchmark" +- -K + filterwarnings = + error + module::ResourceWarning