|
12 | 12 | , idna-ssl
|
13 | 13 | , typing-extensions
|
14 | 14 | , pytestrunner
|
15 |
| -, pytest |
| 15 | +, pytestCheckHook |
16 | 16 | , gunicorn
|
17 | 17 | , pytest-timeout
|
18 | 18 | , async_generator
|
|
22 | 22 | , trustme
|
23 | 23 | , brotlipy
|
24 | 24 | , freezegun
|
| 25 | +, isPy38 |
25 | 26 | }:
|
26 | 27 |
|
27 | 28 | buildPythonPackage rec {
|
28 | 29 | pname = "aiohttp";
|
29 | 30 | version = "3.6.2";
|
30 | 31 | # https://github.com/aio-libs/aiohttp/issues/4525 python3.8 failures
|
31 |
| - disabled = pythonOlder "3.5" || pythonAtLeast "3.8"; |
| 32 | + disabled = pythonOlder "3.5"; |
32 | 33 |
|
33 | 34 | src = fetchPypi {
|
34 | 35 | inherit pname version;
|
35 | 36 | sha256 = "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5";
|
36 | 37 | };
|
37 | 38 |
|
38 | 39 | checkInputs = [
|
39 |
| - pytestrunner pytest gunicorn async_generator pytest_xdist |
| 40 | + pytestrunner pytestCheckHook gunicorn async_generator pytest_xdist |
40 | 41 | pytest-mock pytestcov trustme brotlipy freezegun
|
41 | 42 | ];
|
42 | 43 |
|
43 | 44 | propagatedBuildInputs = [ attrs chardet multidict async-timeout yarl ]
|
44 | 45 | ++ lib.optionals (pythonOlder "3.7") [ idna-ssl typing-extensions ];
|
45 | 46 |
|
46 |
| - # disable tests which attempt to do loopback connections |
47 |
| - checkPhase = '' |
| 47 | + disabledTests = [ |
| 48 | + # disable tests which attempt to do loopback connections |
| 49 | + "get_valid_log_format_exc" |
| 50 | + "test_access_logger_atoms" |
| 51 | + "aiohttp_request_coroutine" |
| 52 | + "server_close_keepalive_connection" |
| 53 | + "connector" |
| 54 | + "client_disconnect" |
| 55 | + "handle_keepalive_on_closed_connection" |
| 56 | + "proxy_https_bad_response" |
| 57 | + "partially_applied_handler" |
| 58 | + "middleware" |
| 59 | + ] ++ lib.optionals stdenv.is32bit [ |
| 60 | + "test_cookiejar" |
| 61 | + ] ++ lib.optionals isPy38 [ |
| 62 | + # Python 3.8 https://github.com/aio-libs/aiohttp/issues/4525 |
| 63 | + "test_read_boundary_with_incomplete_chunk" |
| 64 | + "test_read_incomplete_chunk" |
| 65 | + "test_request_tracing_exception" |
| 66 | + ]; |
| 67 | + |
| 68 | + # aiohttp in current folder shadows installed version |
| 69 | + # Probably because we run `python -m pytest` instead of `pytest` in the hook. |
| 70 | + preCheck = '' |
48 | 71 | cd tests
|
49 |
| - pytest -k "not get_valid_log_format_exc \ |
50 |
| - and not test_access_logger_atoms \ |
51 |
| - and not aiohttp_request_coroutine \ |
52 |
| - and not server_close_keepalive_connection \ |
53 |
| - and not connector \ |
54 |
| - and not client_disconnect \ |
55 |
| - and not handle_keepalive_on_closed_connection \ |
56 |
| - and not proxy_https_bad_response \ |
57 |
| - and not partially_applied_handler \ |
58 |
| - ${lib.optionalString stdenv.is32bit "and not test_cookiejar"} \ |
59 |
| - and not middleware" \ |
60 |
| - --ignore=test_connector.py |
61 | 72 | '';
|
62 | 73 |
|
63 | 74 | meta = with lib; {
|
|
0 commit comments