about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/httpcore/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/httpcore/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/httpcore/default.nix34
1 files changed, 13 insertions, 21 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/httpcore/default.nix b/nixpkgs/pkgs/development/python-modules/httpcore/default.nix
index 91cd904e3afe..d9fd192b7bd1 100644
--- a/nixpkgs/pkgs/development/python-modules/httpcore/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/httpcore/default.nix
@@ -13,8 +13,8 @@
 , pytest-trio
 , pytestCheckHook
 , pythonOlder
-, sniffio
 , socksio
+, trio
 # for passthru.tests
 , httpx
 , httpx-socks
@@ -22,16 +22,16 @@
 
 buildPythonPackage rec {
   pname = "httpcore";
-  version = "0.18.0";
+  version = "1.0.2";
   format = "pyproject";
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "encode";
-    repo = pname;
+    repo = "httpcore";
     rev = "refs/tags/${version}";
-    hash = "sha256-UEpERsB7jZlMqRtyHxLYBisfDbTGaAiTtsgU1WUpvtA=";
+    hash = "sha256-gjAScRBzAuNiTSxspX6vzwTAdBIwVQbaSLEUFV1QP+E=";
   };
 
   nativeBuildInputs = [
@@ -40,19 +40,23 @@ buildPythonPackage rec {
   ];
 
   propagatedBuildInputs = [
-    anyio
     certifi
     h11
-    sniffio
   ];
 
   passthru.optional-dependencies = {
+    asyncio = [
+      anyio
+    ];
     http2 = [
       h2
     ];
     socks = [
       socksio
     ];
+    trio = [
+      trio
+    ];
   };
 
   nativeCheckInputs = [
@@ -61,19 +65,7 @@ buildPythonPackage rec {
     pytest-httpbin
     pytest-trio
     pytestCheckHook
-  ] ++ passthru.optional-dependencies.http2
-    ++ passthru.optional-dependencies.socks;
-
-  disabledTests = [
-    # https://github.com/encode/httpcore/discussions/813
-    "test_connection_pool_timeout_during_request"
-    "test_connection_pool_timeout_during_response"
-    "test_h11_timeout_during_request"
-    "test_h11_timeout_during_response"
-    "test_h2_timeout_during_handshake"
-    "test_h2_timeout_during_request"
-    "test_h2_timeout_during_response"
-  ];
+  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
 
   pythonImportsCheck = [
     "httpcore"
@@ -86,7 +78,7 @@ buildPythonPackage rec {
   };
 
   meta = with lib; {
-    changelog = "https://github.com/encode/httpcore/releases/tag/${version}";
+    changelog = "https://github.com/encode/httpcore/blob/${version}/CHANGELOG.md";
     description = "A minimal low-level HTTP client";
     homepage = "https://github.com/encode/httpcore";
     license = licenses.bsd3;