Merge pull request #310049 from mweinelt/aiomcache-0.8.2

python312Packages.aiomcache: 0.8.1 -> 0.8.2
This commit is contained in:
Martin Weinelt 2024-05-08 21:19:46 +02:00 committed by GitHub
commit b3590a77b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 6 deletions

View File

@ -1,8 +1,15 @@
{ lib
, aiohttp
, aiomcache
, buildPythonPackage
, fetchFromGitHub
, marshmallow
, msgpack
, pkgs
, pythonOlder
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, redis
, setuptools
}:
@ -21,21 +28,60 @@ buildPythonPackage rec {
hash = "sha256-yvXDNJL8uxReaU81klVWudJwh1hmvg5GeeILcNpm/YA=";
};
nativeBuildInputs = [
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "--cov=aiocache --cov=tests/ --cov-report term" ""
'';
build-system = [
setuptools
];
passthru.optional-dependencies = {
optional-dependencies = {
redis = [
redis
];
memcached = [
aiomcache
];
msgpack = [
msgpack
];
};
# aiomcache would be required but last release was in 2017
doCheck = false;
nativeCheckInputs = [
aiohttp
marshmallow
pytest-asyncio
pytest-mock
pytestCheckHook
] ++ lib.flatten (lib.attrValues optional-dependencies);
pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
# TypeError: object MagicMock can't be used in 'await' expression
"--deselect=tests/ut/backends/test_redis.py::TestRedisBackend::test_close"
];
disabledTests = [
# calls apache benchmark and fails, no usable output
"test_concurrency_error_rates"
];
preCheck = ''
${lib.getBin pkgs.redis}/bin/redis-server &
REDIS_PID=$!
${lib.getBin pkgs.memcached}/bin/memcached &
MEMCACHED_PID=$!
'';
postCheck = ''
kill $REDIS_PID
kill $MEMCACHED_PID
'';
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [
"aiocache"

View File

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "aiomcache";
version = "0.8.1";
version = "0.8.2";
pyproject = true;
src = fetchFromGitHub {
owner = "aio-libs";
repo = "aiomcache";
rev = "v${version}";
hash = "sha256-oRMN1seEjFSsq4wjkIXHM7Osq8y/5WFExGCEr6eM9vc=";
hash = "sha256-+rlKHDop0kNxJ0HoXROs/oyI4zE3MDyxXXhWZtVDMj4=";
};
build-system = [