Skip to content

Commit b8f7c6e

Browse files
committedJun 11, 2020
python3.pkgs.aiohttp: disable failing python 3.8 tests
1 parent 13add13 commit b8f7c6e

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed
 

‎pkgs/development/python-modules/aiohttp/default.nix

+28-17
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
, idna-ssl
1313
, typing-extensions
1414
, pytestrunner
15-
, pytest
15+
, pytestCheckHook
1616
, gunicorn
1717
, pytest-timeout
1818
, async_generator
@@ -22,42 +22,53 @@
2222
, trustme
2323
, brotlipy
2424
, freezegun
25+
, isPy38
2526
}:
2627

2728
buildPythonPackage rec {
2829
pname = "aiohttp";
2930
version = "3.6.2";
3031
# https://github.com/aio-libs/aiohttp/issues/4525 python3.8 failures
31-
disabled = pythonOlder "3.5" || pythonAtLeast "3.8";
32+
disabled = pythonOlder "3.5";
3233

3334
src = fetchPypi {
3435
inherit pname version;
3536
sha256 = "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5";
3637
};
3738

3839
checkInputs = [
39-
pytestrunner pytest gunicorn async_generator pytest_xdist
40+
pytestrunner pytestCheckHook gunicorn async_generator pytest_xdist
4041
pytest-mock pytestcov trustme brotlipy freezegun
4142
];
4243

4344
propagatedBuildInputs = [ attrs chardet multidict async-timeout yarl ]
4445
++ lib.optionals (pythonOlder "3.7") [ idna-ssl typing-extensions ];
4546

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 = ''
4871
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
6172
'';
6273

6374
meta = with lib; {

0 commit comments

Comments
 (0)
Please sign in to comment.