about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/httpx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/httpx/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/httpx/default.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/httpx/default.nix b/nixpkgs/pkgs/development/python-modules/httpx/default.nix
index 014272bcc107..543308a3fdc1 100644
--- a/nixpkgs/pkgs/development/python-modules/httpx/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/httpx/default.nix
@@ -9,6 +9,7 @@
 , httpcore
 , rfc3986
 , sniffio
+, python
 , pytestCheckHook
 , pytest-asyncio
 , pytest-trio
@@ -19,14 +20,14 @@
 
 buildPythonPackage rec {
   pname = "httpx";
-  version = "0.19.0";
+  version = "0.21.1";
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "encode";
     repo = pname;
     rev = version;
-    sha256 = "sha256-bUxxeUYqOHBmSL2gPQG5cIq6k5QY4Kyhj9ToA5yZXPA=";
+    sha256 = "sha256-ayhLP+1hPWAx2ds227CKp5cebVkD5B2Z59L+3dzdINc=";
   };
 
   propagatedBuildInputs = [
@@ -50,12 +51,24 @@ buildPythonPackage rec {
 
   pythonImportsCheck = [ "httpx" ];
 
+  # testsuite wants to find installed packages for testing entrypoint
+  preCheck = ''
+    export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
+  '';
+
   disabledTests = [
     # httpcore.ConnectError: [Errno 101] Network is unreachable
     "test_connect_timeout"
     # httpcore.ConnectError: [Errno -2] Name or service not known
     "test_async_proxy_close"
     "test_sync_proxy_close"
+    # sensitive to charset_normalizer output
+    "iso-8859-1"
+    "test_response_no_charset_with_iso_8859_1_content"
+  ];
+
+  disabledTestPaths = [
+    "tests/test_main.py"
   ];
 
   __darwinAllowLocalNetworking = true;