git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #144672 from thiagokokada/zhf-sanic

sanic: 21.3.4 -> 21.9.1, sanic-routing: 0.6.2 -> 0.7.2

commit5abb42f39560d9d2a00a10259346e2d8ad1d7c4e authorThiago Kenji Okada <thiagokokada@gmail.com> dateThu 4 Nov 2021, 22:36 (5 years ago) parent573f44007e0891
3 files changed+22−16
pkgs/development/python-modules/pytest-sanic/default.nix+1 pkgs/development/python-modules/sanic-routing/default.nix+2−2 pkgs/development/python-modules/sanic/default.nix+19−14
pkgs/development/python-modules/pytest-sanic/default.nix+1
@@ -47,5 +47,6 @@ buildPythonPackage rec {
4747 homepage = "https://github.com/yunstanford/pytest-sanic/";
4848 license = licenses.asl20;
4949 maintainers = with maintainers; [ costrouc ];
50+ broken = true; # 2021-11-04
5051 };
5152}
pkgs/development/python-modules/sanic-routing/default.nix+2−2
@@ -7,13 +7,13 @@
77
88buildPythonPackage rec {
99 pname = "sanic-routing";
10− version = "0.6.2";
10+ version = "0.7.2";
1111
1212 src = fetchFromGitHub {
1313 owner = "sanic-org";
1414 repo = "sanic-routing";
1515 rev = "v${version}";
16− hash = "sha256-ZMl8PB9E401pUfUJ4tW7nBx1TgPQQtx9erVni3zP+lo=";
16+ hash = "sha256-MN6A8CtDVxj34eehr3UIwCT09VOfcruVX+/iImr1MgY=";
1717 };
1818
1919 checkInputs = [ pytestCheckHook pytest-asyncio ];
pkgs/development/python-modules/sanic/default.nix+19−14
@@ -1,4 +1,5 @@
11{ lib
2+, stdenv
23, aiofiles
34, beautifulsoup4
45, buildPythonPackage
@@ -10,7 +11,6 @@
1011, multidict
1112, pytest-asyncio
1213, pytest-benchmark
13−, pytest-sanic
1414, pytest-sugar
1515, pytestCheckHook
1616, sanic-routing
@@ -23,28 +23,19 @@
2323
2424buildPythonPackage rec {
2525 pname = "sanic";
26− version = "21.3.4";
26+ version = "21.9.1";
2727
2828 src = fetchFromGitHub {
2929 owner = "sanic-org";
3030 repo = pname;
3131 rev = "v${version}";
32− sha256 = "0vldlic8gqcf56fqb31igycqf11syd9csk66v34w6dim54lcny2b";
32+ sha256 = "sha256-TRrJr/L8AXLAARPjhBi2FxNh+jvxxdeMN24cT1njmqY=";
3333 };
3434
35− patches = [
36− # Allow later websockets release, https://github.com/sanic-org/sanic/pull/2154
37− (fetchpatch {
38− name = "later-websockets.patch";
39− url = "https://github.com/sanic-org/sanic/commit/5fb820b5c1ce395e86a1ee11996790c65ec7bc65.patch";
40− sha256 = "1glvq23pf1sxqjnrz0w8rr7nsnyz82k1479b3rm8szfkjg9q5d1w";
41− })
42− ];
43−
4435 postPatch = ''
4536 # Loosen dependency requirements.
4637 substituteInPlace setup.py \
47− --replace '"pytest==5.2.1"' '"pytest"' \
38+ --replace '"pytest==6.2.5"' '"pytest"' \
4839 --replace '"gunicorn==20.0.4"' '"gunicorn"' \
4940 --replace '"pytest-sanic",' "" \
5041 # Patch a request headers test to allow brotli encoding
@@ -68,7 +59,6 @@ buildPythonPackage rec {
6859 gunicorn
6960 pytest-asyncio
7061 pytest-benchmark
71− pytest-sanic
7262 pytest-sugar
7363 pytestCheckHook
7464 sanic-testing
@@ -77,6 +67,11 @@ buildPythonPackage rec {
7767
7868 inherit doCheck;
7969
70+ preCheck = ''
71+ # Some tests depends on executables on PATH
72+ PATH="$out/bin:${gunicorn}/bin:$PATH"
73+ '';
74+
8075 disabledTests = [
8176 # Tests are flaky
8277 "test_keep_alive_client_timeout"
@@ -84,8 +79,18 @@ buildPythonPackage rec {
8479 "test_check_timeouts_response_timeout"
8580 "test_reloader_live"
8681 "test_zero_downtime"
82+ # Not working from 21.9.1
83+ "test_create_server_main"
84+ "test_create_server_main_convenience"
85+ "test_debug"
86+ "test_auto_reload"
87+ ] ++ lib.optionals stdenv.isDarwin [
88+ # https://github.com/sanic-org/sanic/issues/2298
89+ "test_no_exceptions_when_cancel_pending_request"
8790 ];
8891
92+ # avoid usage of nixpkgs-review in darwin since tests will compete usage
93+ # for the same local port
8994 __darwinAllowLocalNetworking = true;
9095
9196 pythonImportsCheck = [ "sanic" ];