1{
2 lib,
3 buildPythonPackage,
4 pythonAtLeast,
5 pythonOlder,
6 fetchFromGitHub,
7 anyio,
8 async-generator,
9 h11,
10 curio,
11 overly,
12 pytestCheckHook,
13 trio,
14}:
15
16buildPythonPackage rec {
17 pname = "asks";
18 version = "3.0.0";
19
20 disabled = pythonOlder "3.6";
21
22 format = "setuptools";
23
24 src = fetchFromGitHub {
25 owner = "theelous3";
26 repo = "asks";
27 rev = "v${version}";
28 hash = "sha256-ipQ5n2386DqR3kNpmTVhNPG+LC7gfCbvrlZ97+UP55g=";
29 };
30
31 propagatedBuildInputs = [
32 anyio
33 async-generator
34 h11
35 ];
36
37 nativeCheckInputs = [
38 curio
39 overly
40 pytestCheckHook
41 trio
42 ];
43
44 disabledTests = lib.optionals (pythonAtLeast "3.12") [
45 # stuck in threading waiter.acquire()
46 "test_https_get"
47 "test_https_get_checks_cert"
48 ];
49
50 pythonImportsCheck = [ "asks" ];
51
52 meta = {
53 description = "Async requests-like HTTP library for Python";
54 homepage = "https://github.com/theelous3/asks";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ dotlambda ];
57 };
58}