From 708d34a5c5a420b8b539e5d400c2848f49438bbf Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 29 Dec 2019 13:10:17 -0500 Subject: [PATCH] python3Packages.starlette: 0.12.13 -> 0.12.9 downgrade (fix fastapi), enable tests fastapi is the only dependent package of starlette. Downgrading version and enabling full tests to fix fastapi. --- .../python-modules/starlette/default.nix | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/starlette/default.nix b/pkgs/development/python-modules/starlette/default.nix index 6580a87b2fe..9fd1d56ea1a 100644 --- a/pkgs/development/python-modules/starlette/default.nix +++ b/pkgs/development/python-modules/starlette/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , aiofiles , graphene , itsdangerous @@ -9,21 +9,25 @@ , pyyaml , requests , ujson +, python-multipart , pytest -, python , uvicorn , isPy27 , darwin +, databases +, aiosqlite }: buildPythonPackage rec { pname = "starlette"; - version = "0.12.13"; + version = "0.12.9"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "9597bc28e3c4659107c1c4a45ec32dc45e947d78fe56230222be673b2c36454a"; + src = fetchFromGitHub { + owner = "encode"; + repo = "starlette"; + rev = version; + sha256 = "0w44s8ynzy8w8dgm755c8jina9i4dd87vqkcv7jc1kwkg384w9i5"; }; propagatedBuildInputs = [ @@ -35,13 +39,17 @@ buildPythonPackage rec { requests ujson uvicorn + python-multipart + databases ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ]; + checkInputs = [ + pytest + aiosqlite + ]; + checkPhase = '' - ${python.interpreter} -c """ -from starlette.applications import Starlette -app = Starlette(debug=True) -""" + pytest --ignore=tests/test_graphql.py ''; meta = with lib; {