Subject: [bug#78228] [PATCH] gnu: Add python-aiohttp-client-cache.

From: [email-masked]
Date: Sun, 04 May 2025 11:40:03 +0200

Mostly LGTM.

Built several time, linted, styled.  Synopsis and description are OK.

On 2025-05-03 18:03, gemmaro wrote:

> +(define-public python-aiohttp-client-cache
> +  (package
> +    (name "python-aiohttp-client-cache")
> +    (version "0.13.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "aiohttp_client_cache" version))
> +       (sha256
> +        (base32 "0lrq8fh94whvfmfr9ncfizq2ssa2fp1v1izd1y7f3gmd80ixcp6w"))
> +       (modules '((guix build utils)))
> +       (snippet '(begin
> +                   (delete-file "test/integration/test_dynamodb.py")
> +                   (delete-file "test/integration/test_mongodb.py")
> +                   ;; These tests require running Redis, SQLite, and HTTP
> +                   ;; servers.
> +                   (delete-file "test/integration/test_redis.py")
> +                   (delete-file "test/integration/test_sqlite.py")
> +                   (delete-file "test/integration/test_memory.py")
> +                   (delete-file "test/integration/test_filesystem.py")))))

You might want to use
(with-directory-excursion "test/integration"
  (for-each delete-file
            '(...)))

if you find that easier to read (not mandatory).

> +    (build-system pyproject-build-system)
> +    (native-inputs (list python-poetry-core
> +                         ;; TODO: Missing packages: pytest-clarity,
> +                         ;; nox-poetry, types-aiofiles.
> +                         python-async-timeout
> +                         python-brotli
> +                         python-faker
> +                         python-pytest
> +                         python-pytest-aiohttp
> +                         python-pytest-asyncio
> +                         python-pytest-cov
> +                         python-pytest-xdist))
> +    (propagated-inputs (list python-aiofiles
> +                             python-aiohttp
> +                             python-aiosqlite
> +                             python-attrs
> +                             python-itsdangerous
> +                             python-redis
> +                             python-url-normalize))
> +    (home-page "https://github.com/requests-cache/aiohttp-client-cache")
> +    (synopsis "Persistent cache for aiohttp requests")
> +    (description "This package is an asynchronous persistent caching library

Here guix style prefers "This package [...] to begin on the next line.

> +specifically designed for @samp{aiohttp} requests in Python.  With
> +support for various storage backends, it offers flexibility in how and
> +where the cache is stored.  Please note that MongoDB and DynamoDB
> +backends are not currently supported due to the absence of the
> +@samp{motor} and @samp{aioboto3} package dependencies.")
> +    (license license:expat)))

-- 
Best regards,
Nicolas Graves