diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-01-03 23:55:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-02-19 11:03:39 +0000 |
commit | f4cf97a04cd5d0b86aa46baec9fb228a8f671c03 (patch) | |
tree | 28192415ff39a661d0001563bf81cc93fa25d16d /nixpkgs/pkgs/development/python-modules/sanic | |
parent | f8422837c9bde058e8f2de37702e7e94b2226040 (diff) | |
parent | 18c84ea816348e2a098390101b92d1e39a9dbd45 (diff) | |
download | nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.gz nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.bz2 nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.lz nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.xz nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.zst nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.zip |
Merge commit '18c84ea816348e2a098390101b92d1e39a9dbd45'
Conflicts: nixpkgs/nixos/modules/misc/documentation.nix nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/go-modules/generic/default.nix nixpkgs/pkgs/development/interpreters/ruby/default.nix nixpkgs/pkgs/development/interpreters/ruby/patchsets.nix nixpkgs/pkgs/development/libraries/boehm-gc/7.6.6.nix nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix nixpkgs/pkgs/servers/mail/mailman/web.nix nixpkgs/pkgs/top-level/aliases.nix nixpkgs/pkgs/top-level/all-packages.nix nixpkgs/pkgs/top-level/impure.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/sanic')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/sanic/default.nix | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/sanic/default.nix b/nixpkgs/pkgs/development/python-modules/sanic/default.nix index cc7be4c93dc6..2fab2a3df889 100644 --- a/nixpkgs/pkgs/development/python-modules/sanic/default.nix +++ b/nixpkgs/pkgs/development/python-modules/sanic/default.nix @@ -1,18 +1,18 @@ { lib +, stdenv , aiofiles , beautifulsoup4 , buildPythonPackage , doCheck ? true , fetchFromGitHub -, fetchpatch , gunicorn , httptools , multidict , pytest-asyncio , pytest-benchmark -, pytest-sanic , pytest-sugar , pytestCheckHook +, pythonOlder , sanic-routing , sanic-testing , ujson @@ -23,28 +23,22 @@ buildPythonPackage rec { pname = "sanic"; - version = "21.3.4"; + version = "21.9.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "sanic-org"; repo = pname; rev = "v${version}"; - sha256 = "0vldlic8gqcf56fqb31igycqf11syd9csk66v34w6dim54lcny2b"; + sha256 = "0m18jdw1mvf7jhpnrxhm96p24pxvv0h9m71a8c7sqqkwnnpa3p5i"; }; - patches = [ - # Allow later websockets release, https://github.com/sanic-org/sanic/pull/2154 - (fetchpatch { - name = "later-websockets.patch"; - url = "https://github.com/sanic-org/sanic/commit/5fb820b5c1ce395e86a1ee11996790c65ec7bc65.patch"; - sha256 = "1glvq23pf1sxqjnrz0w8rr7nsnyz82k1479b3rm8szfkjg9q5d1w"; - }) - ]; - postPatch = '' # Loosen dependency requirements. substituteInPlace setup.py \ - --replace '"pytest==5.2.1"' '"pytest"' \ + --replace '"pytest==6.2.5"' '"pytest"' \ --replace '"gunicorn==20.0.4"' '"gunicorn"' \ --replace '"pytest-sanic",' "" \ # Patch a request headers test to allow brotli encoding @@ -68,7 +62,6 @@ buildPythonPackage rec { gunicorn pytest-asyncio pytest-benchmark - pytest-sanic pytest-sugar pytestCheckHook sanic-testing @@ -77,6 +70,11 @@ buildPythonPackage rec { inherit doCheck; + preCheck = '' + # Some tests depends on sanic on PATH + PATH="$out/bin:$PATH" + ''; + disabledTests = [ # Tests are flaky "test_keep_alive_client_timeout" @@ -84,11 +82,34 @@ buildPythonPackage rec { "test_check_timeouts_response_timeout" "test_reloader_live" "test_zero_downtime" + # Not working from 21.9.1 + "test_create_server_main" + "test_create_server_main_convenience" + "test_debug" + "test_auto_reload" + "test_no_exceptions_when_cancel_pending_request" + "test_ipv6_address_is_not_wrapped" + # Failure of the redirect tests seems to be related to httpx>0.20.0 + "test_redirect" + "test_chained_redirect" + "test_unix_connection" + # These appear to be very sensitive to output of commands + "test_access_logs" + "test_auto_reload" + "test_host_port" + "test_no_exceptions_when_cancel_pending_request" + "test_num_workers" + "test_server_run" + "test_version" ]; + # avoid usage of nixpkgs-review in darwin since tests will compete usage + # for the same local port __darwinAllowLocalNetworking = true; - pythonImportsCheck = [ "sanic" ]; + pythonImportsCheck = [ + "sanic" + ]; meta = with lib; { description = "Web server and web framework"; |