diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/httpx/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/httpx/default.nix | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/httpx/default.nix b/nixpkgs/pkgs/development/python-modules/httpx/default.nix index 0b29c80fc39..5361e047207 100644 --- a/nixpkgs/pkgs/development/python-modules/httpx/default.nix +++ b/nixpkgs/pkgs/development/python-modules/httpx/default.nix @@ -1,65 +1,70 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , certifi -, hstspreload , chardet , h11 , h2 +, httpcore , idna , rfc3986 , sniffio , isPy27 , pytest +, pytest-asyncio +, pytest-trio , pytestcov , trustme , uvicorn -, trio , brotli -, urllib3 }: buildPythonPackage rec { pname = "httpx"; - version = "0.12.1"; + version = "0.14.2"; disabled = isPy27; src = fetchFromGitHub { owner = "encode"; repo = pname; rev = version; - sha256 = "1nrp4h1ppb5vll81fzxmks82p0hxcil9f3mja3dgya511kc703h6"; + sha256 = "08b6k5g8car3bic90aw4ysb2zvsa5nm8qk3hk4dgamllnnxzl5br"; }; + patches = [ + (fetchpatch { + name = "fix-cookie-test-timestamp.patch"; + url = "https://github.com/encode/httpx/pull/1270.patch"; + sha256 = "1hgrynac6226sgnyzmsr1nr15rn49gbfmk4c2kx3dwkbh6vr7jpd"; + }) + ]; + propagatedBuildInputs = [ certifi - hstspreload chardet h11 h2 + httpcore idna rfc3986 sniffio - urllib3 ]; checkInputs = [ pytest + pytest-asyncio + pytest-trio pytestcov trustme uvicorn - trio brotli ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "h11==0.8.*" "h11" - ''; - checkPhase = '' - PYTHONPATH=.:$PYTHONPATH pytest + PYTHONPATH=.:$PYTHONPATH pytest -k 'not (test_connect_timeout or test_elapsed_timer)' ''; + pythonImportsCheck = [ "httpx" ]; meta = with lib; { description = "The next generation HTTP client"; |