Merge pull request #114556 from mweinelt/python/aiohttp

python3Packages.aiohttp: 3.7.3 -> 3.7.4
This commit is contained in:
Sandro 2021-02-27 21:33:09 +01:00 committed by GitHub
commit cf0e9da7ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,82 +3,77 @@
, buildPythonPackage
, fetchPypi
, pythonOlder
, async-timeout
, attrs
, chardet
, multidict
, async-timeout
, yarl
, idna-ssl
, multidict
, typing-extensions
, pytestrunner
, pytestCheckHook
, gunicorn
, yarl
, async_generator
, pytest_xdist
, pytestcov
, pytest-mock
, trustme
, brotlipy
, freezegun
, isPy38
, gunicorn
, pytest-mock
, pytest-xdist
, pytestCheckHook
, re-assert
, trustme
}:
buildPythonPackage rec {
pname = "aiohttp";
version = "3.7.3";
# https://github.com/aio-libs/aiohttp/issues/4525 python3.8 failures
disabled = pythonOlder "3.5";
version = "3.7.4";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "9c1a81af067e72261c9cbe33ea792893e83bc6aa987bfbd6fdc1e5e7b22777c4";
sha256 = "1pn79h8fng4xi5gl1f6saw31nxgmgyxl41yf3vba1l21673yr12x";
};
checkInputs = [
pytestrunner pytestCheckHook gunicorn async_generator pytest_xdist
pytest-mock pytestcov trustme brotlipy freezegun
re-assert
];
postPatch = ''
substituteInPlace setup.cfg --replace " --cov=aiohttp" ""
'';
propagatedBuildInputs = [
async-timeout
attrs
chardet
multidict
async-timeout
typing-extensions
yarl
] ++ lib.optionals (pythonOlder "3.7") [
idna-ssl
];
checkInputs = [
async_generator
brotlipy
freezegun
gunicorn
pytest-mock
pytest-xdist
pytestCheckHook
re-assert
trustme
];
pytestFlagsArray = [
"-n auto"
];
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"
# Disable tests that require network access
"test_mark_formdata_as_processed"
# no longer compatible with pytest>=6
"aiohttp_plugin_async_fixture"
] ++ 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"
] ++ lib.optionals stdenv.isDarwin [
"test_addresses" # https://github.com/aio-libs/aiohttp/issues/3572
"test_addresses" # https://github.com/aio-libs/aiohttp/issues/3572, remove >= v4.0.0
"test_close"
];
__darwinAllowLocalNetworking = true;
# aiohttp in current folder shadows installed version
# Probably because we run `python -m pytest` instead of `pytest` in the hook.
preCheck = ''