diff options
Diffstat (limited to 'pkgs/development/python-modules/sanic/default.nix')
-rw-r--r-- | pkgs/development/python-modules/sanic/default.nix | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 2fab2a3df889c..660ca5de80bf6 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "sanic"; - version = "21.9.3"; + version = "21.12.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -32,7 +32,7 @@ buildPythonPackage rec { owner = "sanic-org"; repo = pname; rev = "v${version}"; - sha256 = "0m18jdw1mvf7jhpnrxhm96p24pxvv0h9m71a8c7sqqkwnnpa3p5i"; + sha256 = "0jyl23q7b7fyqzan97qflkqcvmfpzbxbzv0qgygxasrzh80zx67g"; }; postPatch = '' @@ -73,9 +73,24 @@ buildPythonPackage rec { preCheck = '' # Some tests depends on sanic on PATH PATH="$out/bin:$PATH" + PYTHONPATH=$PWD:$PYTHONPATH + + # needed for relative paths for some packages + cd tests ''; + # uvloop usage is buggy + #SANIC_NO_UVLOOP = true; + + pytestFlagsArray = [ + "--asyncio-mode=auto" + ]; + disabledTests = [ + # Lack of uvloop setup through fixtures + "test_create_asyncio_server" + "test_listeners_triggered_async" + "test_tls_options" # Tests are flaky "test_keep_alive_client_timeout" "test_check_timeouts_request_timeout" @@ -103,6 +118,14 @@ buildPythonPackage rec { "test_version" ]; + disabledTestPaths = [ + # unable to create async loop + "test_app.py" + "test_asgi.py" + # occasionally hangs + "test_multiprocessing.py" + ]; + # avoid usage of nixpkgs-review in darwin since tests will compete usage # for the same local port __darwinAllowLocalNetworking = true; |