python3Packages.sanic: 21.3.2 -> 21.3.4

While we're at it, revise the dependencies lists; there's been a couple
of break-ups with 21.3.0.
This commit is contained in:
Aluísio Augusto Silva Gonçalves 2021-04-27 10:31:42 -03:00
parent 192b28a75f
commit bd815d2121
No known key found for this signature in database
GPG Key ID: DA6EA2FACDB1CBD2
2 changed files with 21 additions and 16 deletions

View File

@ -1,42 +1,44 @@
{ lib, buildPythonPackage, fetchPypi, doCheck ? true { lib, buildPythonPackage, fetchPypi, doCheck ? true
, aiofiles, httptools, httpx, multidict, ujson, uvloop, websockets , aiofiles, httptools, multidict, sanic-routing, ujson, uvloop, websockets
, pytestCheckHook, beautifulsoup4, gunicorn, httpcore, uvicorn , pytestCheckHook, beautifulsoup4, gunicorn, uvicorn, sanic-testing
, pytest-asyncio, pytest-benchmark, pytest-dependency, pytest-sanic, pytest-sugar, pytestcov , pytest-benchmark, pytest-sanic, pytest-sugar, pytestcov
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "sanic"; pname = "sanic";
version = "21.3.2"; version = "21.3.4";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "84a04c5f12bf321bed3942597787f1854d15c18f157aebd7ced8c851ccc49e08"; sha256 = "1cbd12b9138b3ca69656286b0be91fff02b826e8cb72dd76a2ca8c5eb1288d8e";
}; };
postPatch = '' postPatch = ''
# Loosen dependency requirements.
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace '"multidict==5.0.0"' '"multidict"' \ --replace '"pytest==5.2.1"' '"pytest"' \
--replace '"httpx==0.15.4"' '"httpx"' \ --replace '"gunicorn==20.0.4"' '"gunicorn"' \
--replace '"httpcore==0.3.0"' '"httpcore"' \ --replace '"pytest-sanic",' ""
--replace '"pytest==5.2.1"' '"pytest"' # Patch a request headers test to allow brotli encoding
# (we build httpx with brotli support, upstream doesn't).
substituteInPlace tests/test_headers.py \
--replace "deflate\r\n" "deflate, br\r\n"
''; '';
propagatedBuildInputs = [ propagatedBuildInputs = [
aiofiles httptools httpx multidict ujson uvloop websockets sanic-routing httptools uvloop ujson aiofiles websockets multidict
]; ];
checkInputs = [ checkInputs = [
pytestCheckHook beautifulsoup4 gunicorn httpcore uvicorn sanic-testing gunicorn pytestcov beautifulsoup4 pytest-sanic pytest-sugar
pytest-asyncio pytest-benchmark pytest-dependency pytest-sanic pytest-sugar pytestcov pytest-benchmark pytestCheckHook uvicorn
]; ];
inherit doCheck; inherit doCheck;
disabledTests = [ disabledTests = [
"test_gunicorn" # No "examples" directory in pypi distribution. "test_gunicorn" # No "examples" directory in pypi distribution.
"test_logo" # Fails to filter out "DEBUG asyncio:selector_events.py:59 Using selector: EpollSelector"
"test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution. "test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution.
"test_reloader_live" # OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 42104)
]; ];
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
@ -45,8 +47,8 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "A microframework based on uvloop, httptools, and learnings of flask"; description = "A microframework based on uvloop, httptools, and learnings of flask";
homepage = "https://github.com/channelcat/sanic/"; homepage = "https://github.com/sanic-org/sanic/";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.costrouc ]; maintainers = with maintainers; [ costrouc AluisioASG ];
}; };
} }

View File

@ -7201,6 +7201,9 @@ in {
doCheck = false; doCheck = false;
meta.broken = false; meta.broken = false;
}); });
# Don't pass any `sanic` to avoid dependency loops. `sanic-testing`
# has special logic to disable tests when this is the case.
sanic-testing = self.sanic-testing.override { sanic = null; };
}; };
sanic-auth = callPackage ../development/python-modules/sanic-auth { }; sanic-auth = callPackage ../development/python-modules/sanic-auth { };