From 4aa95890f32344a58040db10454734a0d21ab02f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 1 Jan 2022 17:16:44 +0100 Subject: [PATCH] python3Packages.fastapi: 0.70.0 -> 0.70.1 --- .../python-modules/fastapi/default.nix | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 85594a2c4c22..f0f10a88c7dd 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -14,25 +14,23 @@ , python-jose , sqlalchemy , trio +, pythonOlder }: buildPythonPackage rec { pname = "fastapi"; - version = "0.70.0"; + version = "0.70.1"; format = "flit"; + disabled = pythonOlder "3.6"; + src = fetchFromGitHub { owner = "tiangolo"; - repo = "fastapi"; + repo = pname; rev = version; - sha256 = "sha256-mLI+w9PeewnwUMuUnXj6J2r/3shinjlwXMnhNcQlhrM="; + sha256 = "sha256-iwjxcAe8h38PPTTDGCxIJSB7zCS0FA0gOcKUjPpk3yg="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "starlette ==" "starlette >=" - ''; - propagatedBuildInputs = [ starlette pydantic @@ -52,16 +50,22 @@ buildPythonPackage rec { trio ]; - # disabled tests require orjson which requires rust nightly - - # ignoring deprecation warnings to avoid test failure from - # tests/test_tutorial/test_testing/test_tutorial001.py + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "starlette ==" "starlette >=" + ''; pytestFlagsArray = [ - "--ignore=tests/test_default_response_class.py" + # ignoring deprecation warnings to avoid test failure from + # tests/test_tutorial/test_testing/test_tutorial001.py "-W ignore::DeprecationWarning" ]; + disabledTestPaths = [ + # Disabled tests require orjson which requires rust nightly + "tests/test_default_response_class.py" + ]; + disabledTests = [ "test_get_custom_response" @@ -70,9 +74,13 @@ buildPythonPackage rec { "test_websocket_no_credentials" ]; + pythonImportsCheck = [ + "fastapi" + ]; + meta = with lib; { + description = "Web framework for building APIs"; homepage = "https://github.com/tiangolo/fastapi"; - description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"; license = licenses.mit; maintainers = with maintainers; [ wd15 ]; };