From 92e10c3337fa4827ae1eb85f4c7550f529ae761c Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 19 Feb 2026 15:06:30 +0900 Subject: gnu: python-limits: Update to 5.8.0. * gnu/packages/python-xyz.scm (python-limits): Update to 5.8.0. [arguments]: Deselect storage tests in test-flags. <#:phases>: Expand ignore-K-pytest-option phase into adjust-tests [native-inputs]: Remove python-setuptools, python-pytest-benchmark, python-pytest-cov, python-pytest-lazy-fixtures and python-pytest-xdist. Add python-hatch-vcs and python-hatchling. Change-Id: Ic7d4b6645c452453cb9bc97b8cb6284697cdbd27 Signed-off-by: Liliana Marie Prikler --- gnu/packages/python-xyz.scm | 52 ++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 20 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 78fa3ddd471..629635f47f0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -6002,7 +6002,7 @@ conventions and aliases in the same expression.") (define-public python-limits (package (name "python-limits") - (version "5.5.0") + (version "5.8.0") (source (origin (method git-fetch) @@ -6011,35 +6011,47 @@ conventions and aliases in the same expression.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1ykld43q1pbvds4wsb18wagh852byzjpcjqg1xwa5cldigmkc2x0")))) + (base32 "1b1p6vpdwkzf89jl03xm56f3jp4dhkz89r63gx51b89ph1lcpi85")))) (build-system pyproject-build-system) (arguments (list - ;; XXX: Despite running only unit tests, pytest exits with an error code. - #:tests? #f - #:test-flags #~(list "-m" "unit") + ;; tests: 155 passed, 620 deselected + #:test-flags + #~(list + ;; The test suite spawns storages in Docker. + "-k" (simple-format #f "not (~a)" + (string-join + '("lazy_dependency" ;importing redis + "memcache" + "mongo" + "redis" + "valkey") + " or ")) + "--ignore=tests/benchmarks") #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'ignore-K-pytest-option + (add-before 'check 'adjust-tests (lambda _ (substitute* "pytest.ini" - (("-K") ""))))))) + ((".*--cov=.*") "") + ((".*-K.*") "")) + (substitute* (find-files "tests" "\\.py$") + (("import pymemcache.*") "") + (("import pymongo.*") "") + (("import redis.*") "") + (("import valkey.*") "") + ;; Lazy fixtures are only used for storages. + (("from pytest_lazy_fixtures import lf.*") "") + (("lf\\((.+)\\)" all fixture) fixture)) + (substitute* "tests/test_storage.py" + (("\\\\..*\\(.*\\)") ""))))))) (propagated-inputs (list python-deprecated python-packaging)) (native-inputs - (list ; python-etcd3 - python-flaky + (list python-flaky + python-hatch-vcs + python-hatchling python-pytest - python-pytest-asyncio - python-pytest-benchmark - python-pytest-cov - python-pytest-lazy-fixtures - python-pytest-xdist - ;; python-pymemcache - ;; python-pymongo - ;; python-redis - python-setuptools - ;; python-valkey - )) + python-pytest-asyncio)) (home-page "https://limits.readthedocs.io/") (synopsis "Rate limiting utilities") (description -- cgit v1.3