summaryrefslogtreecommitdiff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-12-02 18:01:41 +0100
committerHilton Chain <hako@ultrarare.space>2024-12-03 08:24:56 +0800
commitdbe1c211220de6fb6a67d872882a57d2cce7a559 (patch)
tree68a4304fe3bbb849579d7e98911e6547f854eb75 /gnu/packages/databases.scm
parent01f8ad0c93134131ded566c1a9ad227542050909 (diff)
gnu: python-fakeredis: Update to 2.26.1.
* gnu/packages/databases.scm (python-fakeredis): Update to 2.26.1. [arguments]: Do not run slow tests; add phases 'poetry-compatibility and 'start-redis. [propagated-inputs]: Add python-typing-extensions. [native-inputs]: Add redis. Change-Id: I18ed122d9e5307d3d723cfc9ef0d51f120b4ccb5 Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm38
1 files changed, 28 insertions, 10 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index c7edada862..996d61e486 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4341,7 +4341,7 @@ parsing code in hiredis. It primarily speeds up parsing of multi bulk replies."
(define-public python-fakeredis
(package
(name "python-fakeredis")
- (version "2.10.1")
+ (version "2.26.1")
(source (origin
(method git-fetch) ;for tests
(uri (git-reference
@@ -4350,18 +4350,36 @@ parsing code in hiredis. It primarily speeds up parsing of multi bulk replies."
(file-name (git-file-name name version))
(sha256
(base32
- "1imsi9dswvkda894sm53lfzdsna0qlrgxszczlq2sam68zn4hfz6"))))
+ "10f9qwpc9vlcd2411c398n9kwjsk399vk1pjd9dbczlhvsn9s5bq"))))
(build-system pyproject-build-system)
(arguments
- (list #:phases #~(modify-phases %standard-phases
- (add-after 'unpack 'relax-requirements
- (lambda _
- (substitute* "pyproject.toml"
- (("sortedcontainers = \"\\^2\\.4\"")
- "sortedcontainers = \"^2.1\"")))))))
+ (list
+ #:test-flags '(list "-m" "not slow")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'poetry-compatibility
+ (lambda _
+ ;; Our version of poetry does not understand "to".
+ (substitute* "pyproject.toml"
+ ((", to = \"fakeredis\" ") ""))))
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("sortedcontainers = \"\\^2\\.4\"")
+ "sortedcontainers = \"^2.1\""))))
+ ;; Tests require a running Redis server.
+ (add-before 'check 'start-redis
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "redis-server" "--daemonize" "yes"
+ "--port" "6390")))))))
(native-inputs (list python-poetry-core python-pytest
- python-pytest-asyncio python-pytest-mock))
- (propagated-inputs (list python-redis python-sortedcontainers))
+ python-pytest-asyncio python-pytest-mock
+ redis))
+ (propagated-inputs
+ (list python-redis
+ python-sortedcontainers
+ python-typing-extensions))
(home-page "https://github.com/cunla/fakeredis-py")
(synopsis "Fake implementation of redis API for testing purposes")
(description