2017-09-05 10:16:41 +01:00
|
|
|
{ lib
|
2020-02-17 23:52:55 +00:00
|
|
|
, stdenv
|
2017-09-05 10:16:41 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2018-02-12 11:05:12 +00:00
|
|
|
, attrs
|
2017-09-05 10:16:41 +01:00
|
|
|
, chardet
|
|
|
|
, multidict
|
|
|
|
, async-timeout
|
|
|
|
, yarl
|
2018-02-02 14:13:31 +00:00
|
|
|
, idna-ssl
|
2019-01-10 14:11:46 +00:00
|
|
|
, typing-extensions
|
|
|
|
, pytestrunner
|
2020-06-11 07:24:40 +01:00
|
|
|
, pytestCheckHook
|
2017-09-05 10:16:41 +01:00
|
|
|
, gunicorn
|
2019-01-10 14:11:46 +00:00
|
|
|
, async_generator
|
|
|
|
, pytest_xdist
|
|
|
|
, pytestcov
|
|
|
|
, pytest-mock
|
|
|
|
, trustme
|
|
|
|
, brotlipy
|
2019-10-17 09:45:15 +01:00
|
|
|
, freezegun
|
2020-06-11 07:24:40 +01:00
|
|
|
, isPy38
|
2017-09-05 10:16:41 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohttp";
|
2020-10-25 09:06:49 +00:00
|
|
|
version = "3.6.3";
|
2020-01-23 01:18:23 +00:00
|
|
|
# https://github.com/aio-libs/aiohttp/issues/4525 python3.8 failures
|
2020-06-11 07:24:40 +01:00
|
|
|
disabled = pythonOlder "3.5";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-25 09:06:49 +00:00
|
|
|
sha256 = "698cd7bc3c7d1b82bb728bae835724a486a8c376647aec336aa21a60113c3645";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2019-01-10 14:11:46 +00:00
|
|
|
checkInputs = [
|
2020-06-11 07:24:40 +01:00
|
|
|
pytestrunner pytestCheckHook gunicorn async_generator pytest_xdist
|
2019-10-17 09:45:15 +01:00
|
|
|
pytest-mock pytestcov trustme brotlipy freezegun
|
2019-01-10 14:11:46 +00:00
|
|
|
];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2018-02-12 11:05:12 +00:00
|
|
|
propagatedBuildInputs = [ attrs chardet multidict async-timeout yarl ]
|
2019-01-10 14:11:46 +00:00
|
|
|
++ lib.optionals (pythonOlder "3.7") [ idna-ssl typing-extensions ];
|
2018-06-23 11:02:20 +01:00
|
|
|
|
2020-06-11 07:24:40 +01:00
|
|
|
disabledTests = [
|
|
|
|
# disable tests which attempt to do loopback connections
|
|
|
|
"get_valid_log_format_exc"
|
|
|
|
"test_access_logger_atoms"
|
|
|
|
"aiohttp_request_coroutine"
|
|
|
|
"server_close_keepalive_connection"
|
|
|
|
"connector"
|
|
|
|
"client_disconnect"
|
|
|
|
"handle_keepalive_on_closed_connection"
|
|
|
|
"proxy_https_bad_response"
|
|
|
|
"partially_applied_handler"
|
|
|
|
"middleware"
|
2020-08-17 01:13:34 +01:00
|
|
|
# no longer compatible with pytest>=6
|
|
|
|
"aiohttp_plugin_async_fixture"
|
2020-06-11 07:24:40 +01:00
|
|
|
] ++ lib.optionals stdenv.is32bit [
|
|
|
|
"test_cookiejar"
|
|
|
|
] ++ lib.optionals isPy38 [
|
|
|
|
# Python 3.8 https://github.com/aio-libs/aiohttp/issues/4525
|
|
|
|
"test_read_boundary_with_incomplete_chunk"
|
|
|
|
"test_read_incomplete_chunk"
|
|
|
|
"test_request_tracing_exception"
|
2020-06-16 05:23:23 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-06-19 20:11:32 +01:00
|
|
|
"test_addresses" # https://github.com/aio-libs/aiohttp/issues/3572
|
2020-06-16 05:23:23 +01:00
|
|
|
"test_close"
|
2020-06-11 07:24:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
# aiohttp in current folder shadows installed version
|
|
|
|
# Probably because we run `python -m pytest` instead of `pytest` in the hook.
|
|
|
|
preCheck = ''
|
2019-10-17 09:45:15 +01:00
|
|
|
cd tests
|
2019-06-15 07:42:51 +01:00
|
|
|
'';
|
|
|
|
|
2018-02-02 14:13:31 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous HTTP Client/Server for Python and asyncio";
|
|
|
|
license = licenses.asl20;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/aio-libs/aiohttp";
|
2018-02-02 14:13:31 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
2018-01-23 16:30:09 +00:00
|
|
|
}
|