2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
|
|
|
, chardet
|
|
|
|
, fetchPypi
|
|
|
|
, idna
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, urllib3
|
|
|
|
, isPy27
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "2.25.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "sha256-J5c91KkEpPE7JjoZyGbBO5KjntHJZGVfAl8/jT11uAQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
certifi
|
|
|
|
chardet
|
|
|
|
idna
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# AttributeError: 'KeywordMapping' object has no attribute 'get'
|
|
|
|
doCheck = !isPy27;
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Disable tests that require network access and use httpbin
|
|
|
|
"requests.api.request"
|
|
|
|
"requests.models.PreparedRequest"
|
|
|
|
"requests.sessions.Session"
|
|
|
|
"requests"
|
|
|
|
"test_redirecting_to_bad_url"
|
|
|
|
"test_requests_are_updated_each_time"
|
|
|
|
"test_should_bypass_proxies_pass_only_hostname"
|
|
|
|
"test_urllib3_pool_connection_closed"
|
|
|
|
"test_urllib3_retries"
|
|
|
|
"test_use_proxy_from_environment"
|
|
|
|
"TestRequests"
|
|
|
|
"TestTimeout"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "requests" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-03-09 03:18:52 +00:00
|
|
|
description = "Simple HTTP library for Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://docs.python-requests.org/en/latest/";
|
|
|
|
license = licenses.asl20;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|