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>
This commit is contained in:
Ricardo Wurmus 2024-12-02 18:01:41 +01:00 committed by Hilton Chain
parent 01f8ad0c93
commit dbe1c21122
No known key found for this signature in database
GPG key ID: ACC66D09CA528292

View file

@ -4341,7 +4341,7 @@ parsing code in hiredis. It primarily speeds up parsing of multi bulk replies."
(define-public python-fakeredis (define-public python-fakeredis
(package (package
(name "python-fakeredis") (name "python-fakeredis")
(version "2.10.1") (version "2.26.1")
(source (origin (source (origin
(method git-fetch) ;for tests (method git-fetch) ;for tests
(uri (git-reference (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)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1imsi9dswvkda894sm53lfzdsna0qlrgxszczlq2sam68zn4hfz6")))) "10f9qwpc9vlcd2411c398n9kwjsk399vk1pjd9dbczlhvsn9s5bq"))))
(build-system pyproject-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list #:phases #~(modify-phases %standard-phases (list
(add-after 'unpack 'relax-requirements #:test-flags '(list "-m" "not slow")
(lambda _ #:phases
(substitute* "pyproject.toml" #~(modify-phases %standard-phases
(("sortedcontainers = \"\\^2\\.4\"") (add-after 'unpack 'poetry-compatibility
"sortedcontainers = \"^2.1\""))))))) (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 (native-inputs (list python-poetry-core python-pytest
python-pytest-asyncio python-pytest-mock)) python-pytest-asyncio python-pytest-mock
(propagated-inputs (list python-redis python-sortedcontainers)) redis))
(propagated-inputs
(list python-redis
python-sortedcontainers
python-typing-extensions))
(home-page "https://github.com/cunla/fakeredis-py") (home-page "https://github.com/cunla/fakeredis-py")
(synopsis "Fake implementation of redis API for testing purposes") (synopsis "Fake implementation of redis API for testing purposes")
(description (description