summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2026-02-19 15:06:30 +0900
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2026-03-26 06:39:05 +0100
commit92e10c3337fa4827ae1eb85f4c7550f529ae761c (patch)
tree91a84d619d5014d352e31d68e11b72a2219fca8d /gnu/packages
parent904f43aea7be88fa34f2777025c77d48bbbaa7d4 (diff)
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 <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm52
1 files changed, 32 insertions, 20 deletions
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"
+ (("\\<redis\\>\\..*\\(.*\\)") "")))))))
(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