summary refs log tree commit diff
path: root/pkgs/development/python-modules/sanic/default.nix
diff options
context:
space:
mode:
authorAluísio Augusto Silva Gonçalves <aluisio@aasg.name>2021-04-27 10:31:42 -0300
committerAluísio Augusto Silva Gonçalves <aluisio@aasg.name>2021-04-30 09:56:09 -0300
commitbd815d21219840d1aa688083179323ad0161fff5 (patch)
treee117e596cca9e840727f5d55d854d5bc3836709d /pkgs/development/python-modules/sanic/default.nix
parent192b28a75f5bc29378af96784c996d65288bd16c (diff)
downloadnixpkgs-bd815d21219840d1aa688083179323ad0161fff5.tar
nixpkgs-bd815d21219840d1aa688083179323ad0161fff5.tar.gz
nixpkgs-bd815d21219840d1aa688083179323ad0161fff5.tar.bz2
nixpkgs-bd815d21219840d1aa688083179323ad0161fff5.tar.lz
nixpkgs-bd815d21219840d1aa688083179323ad0161fff5.tar.xz
nixpkgs-bd815d21219840d1aa688083179323ad0161fff5.tar.zst
nixpkgs-bd815d21219840d1aa688083179323ad0161fff5.zip
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.
Diffstat (limited to 'pkgs/development/python-modules/sanic/default.nix')
-rw-r--r--pkgs/development/python-modules/sanic/default.nix34
1 files changed, 18 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix
index e5995ed0b1e..31dcc86e0bc 100644
--- a/pkgs/development/python-modules/sanic/default.nix
+++ b/pkgs/development/python-modules/sanic/default.nix
@@ -1,42 +1,44 @@
 { lib, buildPythonPackage, fetchPypi, doCheck ? true
-, aiofiles, httptools, httpx, multidict, ujson, uvloop, websockets
-, pytestCheckHook, beautifulsoup4, gunicorn, httpcore, uvicorn
-, pytest-asyncio, pytest-benchmark, pytest-dependency, pytest-sanic, pytest-sugar, pytestcov
+, aiofiles, httptools, multidict, sanic-routing, ujson, uvloop, websockets
+, pytestCheckHook, beautifulsoup4, gunicorn, uvicorn, sanic-testing
+, pytest-benchmark, pytest-sanic, pytest-sugar, pytestcov
 }:
 
 buildPythonPackage rec {
   pname = "sanic";
-  version = "21.3.2";
+  version = "21.3.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "84a04c5f12bf321bed3942597787f1854d15c18f157aebd7ced8c851ccc49e08";
+    sha256 = "1cbd12b9138b3ca69656286b0be91fff02b826e8cb72dd76a2ca8c5eb1288d8e";
   };
 
   postPatch = ''
+    # Loosen dependency requirements.
     substituteInPlace setup.py \
-      --replace '"multidict==5.0.0"' '"multidict"' \
-      --replace '"httpx==0.15.4"' '"httpx"' \
-      --replace '"httpcore==0.3.0"' '"httpcore"' \
-      --replace '"pytest==5.2.1"' '"pytest"'
+      --replace '"pytest==5.2.1"' '"pytest"' \
+      --replace '"gunicorn==20.0.4"' '"gunicorn"' \
+      --replace '"pytest-sanic",' ""
+    # 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 = [
-    aiofiles httptools httpx multidict ujson uvloop websockets
+    sanic-routing httptools uvloop ujson aiofiles websockets multidict
   ];
 
   checkInputs = [
-    pytestCheckHook beautifulsoup4 gunicorn httpcore uvicorn
-    pytest-asyncio pytest-benchmark pytest-dependency pytest-sanic pytest-sugar pytestcov
+    sanic-testing gunicorn pytestcov beautifulsoup4 pytest-sanic pytest-sugar
+    pytest-benchmark pytestCheckHook uvicorn
   ];
 
   inherit doCheck;
 
   disabledTests = [
     "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_reloader_live" # OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 42104)
   ];
 
   __darwinAllowLocalNetworking = true;
@@ -45,8 +47,8 @@ buildPythonPackage rec {
 
   meta = with lib; {
     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;
-    maintainers = [ maintainers.costrouc ];
+    maintainers = with maintainers; [ costrouc AluisioASG ];
   };
 }