2021-02-17 20:56:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
|
|
|
, chardet
|
|
|
|
, fetchPypi
|
|
|
|
, idna
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, urllib3
|
|
|
|
}:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests";
|
2021-02-17 20:56:00 +00:00
|
|
|
version = "2.25.1";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-17 20:56:00 +00:00
|
|
|
sha256 = "sha256-J5c91KkEpPE7JjoZyGbBO5KjntHJZGVfAl8/jT11uAQ=";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2021-02-17 20:56:00 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
certifi
|
|
|
|
chardet
|
|
|
|
idna
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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" ];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-02-17 20:56:00 +00:00
|
|
|
description = "Simple HTTP library for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://docs.python-requests.org/en/latest/";
|
2017-09-05 10:16:41 +01:00
|
|
|
license = licenses.asl20;
|
2021-02-17 20:56:00 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
}
|