diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/starlette/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/starlette/default.nix | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/starlette/default.nix b/nixpkgs/pkgs/development/python-modules/starlette/default.nix index 3079b60564f1..e8c130692125 100644 --- a/nixpkgs/pkgs/development/python-modules/starlette/default.nix +++ b/nixpkgs/pkgs/development/python-modules/starlette/default.nix @@ -4,6 +4,8 @@ , fetchFromGitHub , isPy27 , aiofiles +, anyio +, contextlib2 , graphene , itsdangerous , jinja2 @@ -12,22 +14,24 @@ , requests , aiosqlite , databases -, pytestCheckHook , pytest-asyncio +, pytestCheckHook +, pythonOlder +, trio , typing-extensions , ApplicationServices }: buildPythonPackage rec { pname = "starlette"; - version = "0.14.2"; - disabled = isPy27; + version = "0.16.0"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "encode"; repo = pname; rev = version; - sha256 = "0fz28czvwiww693ig9vwdja59xxs7m0yp1df32ms1hzr99666bia"; + sha256 = "sha256-/NYhRRZdi6I7CtLCohAqK4prsSUayOxa6sBKIJhPv+w="; }; postPatch = '' @@ -37,19 +41,27 @@ buildPythonPackage rec { propagatedBuildInputs = [ aiofiles + anyio graphene itsdangerous jinja2 python-multipart pyyaml requests - ] ++ lib.optional stdenv.isDarwin [ ApplicationServices ]; + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions + ] ++ lib.optionals (pythonOlder "3.7") [ + contextlib2 + ] ++ lib.optional stdenv.isDarwin [ + ApplicationServices + ]; checkInputs = [ aiosqlite databases pytest-asyncio pytestCheckHook + trio typing-extensions ]; @@ -57,8 +69,12 @@ buildPythonPackage rec { # fails to import graphql, but integrated graphql support is about to # be removed in 0.15, see https://github.com/encode/starlette/pull/1135. "tests/test_graphql.py" - # contextfunction was removed in Jinja 3.1 - "tests/test_templates.py" + ]; + + disabledTests = [ + # asserts fail due to inclusion of br in Accept-Encoding + "test_websocket_headers" + "test_request_headers" ]; pythonImportsCheck = [ "starlette" ]; |