2020-10-28 19:43:51 +00:00
|
|
|
{ lib
|
2020-08-27 22:36:12 +01:00
|
|
|
, buildPythonPackage
|
2020-10-28 19:43:51 +00:00
|
|
|
, pythonOlder
|
2020-08-27 22:36:12 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, h11
|
2020-10-28 19:43:51 +00:00
|
|
|
, h2
|
|
|
|
, pproxy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytestcov
|
2020-08-27 22:36:12 +01:00
|
|
|
, sniffio
|
2020-10-28 19:43:51 +00:00
|
|
|
, uvicorn
|
2021-01-30 18:42:05 +00:00
|
|
|
, trustme
|
|
|
|
, trio
|
2020-08-27 22:36:12 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpcore";
|
2021-01-30 18:42:05 +00:00
|
|
|
version = "0.12.3";
|
2020-10-28 19:43:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-08-27 22:36:12 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-01-30 18:42:05 +00:00
|
|
|
sha256 = "09hbjc5wzhrnri5y3idxcq329d7jiaxljc7y6npwv9gh9saln109";
|
2020-08-27 22:36:12 +01:00
|
|
|
};
|
|
|
|
|
2020-10-28 19:43:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
h11
|
|
|
|
h2
|
|
|
|
sniffio
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pproxy
|
|
|
|
pytestCheckHook
|
|
|
|
pytestcov
|
|
|
|
uvicorn
|
2021-01-30 18:42:05 +00:00
|
|
|
trustme
|
|
|
|
trio
|
2020-10-28 19:43:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
# these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known
|
2021-01-30 18:42:05 +00:00
|
|
|
"--ignore=tests/test_threadsafety.py"
|
2020-10-28 19:43:51 +00:00
|
|
|
"--ignore=tests/sync_tests/test_interfaces.py"
|
2021-01-30 18:42:05 +00:00
|
|
|
"--ignore=tests/sync_tests/test_retries.py"
|
2020-10-28 19:43:51 +00:00
|
|
|
];
|
2020-08-27 22:36:12 +01:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "httpcore" ];
|
|
|
|
|
2020-10-28 19:43:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A minimal low-level HTTP client";
|
2020-08-27 22:36:12 +01:00
|
|
|
homepage = "https://github.com/encode/httpcore";
|
|
|
|
license = licenses.bsd3;
|
2020-10-28 19:43:51 +00:00
|
|
|
maintainers = with maintainers; [ ris ];
|
2020-08-27 22:36:12 +01:00
|
|
|
};
|
|
|
|
}
|