2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-11-03 02:18:15 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-08-05 21:33:18 +00:00
|
|
|
, brotlicffi
|
2020-04-24 23:36:52 +00:00
|
|
|
, certifi
|
2021-09-18 10:52:07 +00:00
|
|
|
, charset-normalizer
|
2020-04-24 23:36:52 +00:00
|
|
|
, h2
|
2020-09-25 04:45:31 +00:00
|
|
|
, httpcore
|
2020-04-24 23:36:52 +00:00
|
|
|
, rfc3986
|
|
|
|
, sniffio
|
2020-11-03 02:18:15 +00:00
|
|
|
, pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-trio
|
2021-08-05 21:33:18 +00:00
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
, trustme
|
|
|
|
, uvicorn
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpx";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.19.0";
|
2020-11-03 02:18:15 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-bUxxeUYqOHBmSL2gPQG5cIq6k5QY4Kyhj9ToA5yZXPA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-08-05 21:33:18 +00:00
|
|
|
brotlicffi
|
2020-04-24 23:36:52 +00:00
|
|
|
certifi
|
2021-09-18 10:52:07 +00:00
|
|
|
charset-normalizer
|
2020-04-24 23:36:52 +00:00
|
|
|
h2
|
2020-09-25 04:45:31 +00:00
|
|
|
httpcore
|
2020-04-24 23:36:52 +00:00
|
|
|
rfc3986
|
|
|
|
sniffio
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-11-03 02:18:15 +00:00
|
|
|
pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-trio
|
2020-04-24 23:36:52 +00:00
|
|
|
trustme
|
2021-08-05 21:33:18 +00:00
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
uvicorn
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "httpx" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The next generation HTTP client";
|
|
|
|
homepage = "https://github.com/encode/httpx";
|
|
|
|
license = licenses.bsd3;
|
2021-08-05 21:33:18 +00:00
|
|
|
maintainers = with maintainers; [ costrouc fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|