1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, certifi
, chardet
, h11
, h2
, httpcore
, idna
, rfc3986
, sniffio
, isPy27
, pytest
, pytest-asyncio
, pytest-trio
, pytestcov
, trustme
, uvicorn
, brotli
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.14.2";
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "08b6k5g8car3bic90aw4ysb2zvsa5nm8qk3hk4dgamllnnxzl5br";
};
patches = [
(fetchpatch {
name = "fix-cookie-test-timestamp.patch";
url = "https://github.com/encode/httpx/pull/1270.patch";
sha256 = "1hgrynac6226sgnyzmsr1nr15rn49gbfmk4c2kx3dwkbh6vr7jpd";
})
];
propagatedBuildInputs = [
certifi
chardet
h11
h2
httpcore
idna
rfc3986
sniffio
];
checkInputs = [
pytest
pytest-asyncio
pytest-trio
pytestcov
trustme
uvicorn
brotli
];
checkPhase = ''
PYTHONPATH=.:$PYTHONPATH pytest -k 'not (test_connect_timeout or test_elapsed_timer)'
'';
pythonImportsCheck = [ "httpx" ];
meta = with lib; {
description = "The next generation HTTP client";
homepage = "https://github.com/encode/httpx";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}
|