python3Packages.aiohttp: 3.7.3 -> 3.7.4

https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst#374-2021-02-25

Clean up package, reenable tests, allow local networking for darwin for
loopback network tests, actually enable xdist, disable coverage.

Fixes: CVE-2021-21330
This commit is contained in:
Martin Weinelt 2021-02-27 13:05:52 +01:00 committed by github-actions[bot]
parent 0c98cef613
commit 48ebb82c32

View File

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