diff --git a/pkgs/development/python-modules/h11/default.nix b/pkgs/development/python-modules/h11/default.nix index 98dd8eef6cbd..bb61c5310354 100644 --- a/pkgs/development/python-modules/h11/default.nix +++ b/pkgs/development/python-modules/h11/default.nix @@ -3,16 +3,18 @@ , fetchPypi , pytestCheckHook , pythonOlder +, httpcore +, wsproto }: buildPythonPackage rec { pname = "h11"; - version = "0.13.0"; + version = "0.14.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-cIE8ETUIeiSKTTjMDhoBgf+rIYgUGpPq9WeUDDlX/wY="; + sha256 = "sha256-jxn7vpnnJCD/NcALJ6NMuZN+kCqLgQ4siDAMbwo7aZ0="; }; checkInputs = [ pytestCheckHook ]; @@ -20,6 +22,10 @@ buildPythonPackage rec { # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; + passthru.tests = { + inherit httpcore wsproto; + }; + meta = with lib; { description = "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1"; homepage = "https://github.com/python-hyper/h11"; diff --git a/pkgs/development/python-modules/httpcore/default.nix b/pkgs/development/python-modules/httpcore/default.nix index 5016ece96f2f..61a3b8d73235 100644 --- a/pkgs/development/python-modules/httpcore/default.nix +++ b/pkgs/development/python-modules/httpcore/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "httpcore"; - version = "0.15.0"; + version = "0.16.2"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -26,14 +26,9 @@ buildPythonPackage rec { owner = "encode"; repo = pname; rev = version; - hash = "sha256-FF3Yzac9nkVcA5bHVOz2ymvOelSfJ0K6oU8UWpBDcmo="; + hash = "sha256-bwGZ/B0jlvc1BmXVTo7gMP6PJIQuCHclkHjKQCgMsyU="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "h11>=0.11,<0.13" "h11>=0.11,<0.14" - ''; - propagatedBuildInputs = [ anyio certifi @@ -63,6 +58,12 @@ buildPythonPackage rec { "httpcore" ]; + preCheck = '' + # remove upstreams pytest flags which cause: + # httpcore.ConnectError: TLS/SSL connection has been closed (EOF) (_ssl.c:997) + rm setup.cfg + ''; + pytestFlagsArray = [ "--asyncio-mode=strict" ];