2021-03-05 22:38:19 +00:00
|
|
|
{ lib
|
2021-03-13 09:44:31 +00:00
|
|
|
, stdenv
|
2021-03-05 22:38:19 +00:00
|
|
|
, brotli
|
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
|
|
|
, cryptography
|
|
|
|
, dateutil
|
|
|
|
, fetchPypi
|
|
|
|
, idna
|
|
|
|
, mock
|
|
|
|
, pyopenssl
|
|
|
|
, pysocks
|
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, tornado
|
|
|
|
, trustme
|
|
|
|
}:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "urllib3";
|
2021-02-20 09:09:18 +00:00
|
|
|
version = "1.26.3";
|
2021-03-05 22:38:19 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 09:09:18 +00:00
|
|
|
sha256 = "de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2021-03-05 22:38:19 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
brotli
|
|
|
|
certifi
|
|
|
|
cryptography
|
|
|
|
idna
|
|
|
|
pyopenssl
|
|
|
|
pysocks
|
2017-09-05 10:16:41 +01:00
|
|
|
];
|
|
|
|
|
2021-03-05 22:38:19 +00:00
|
|
|
checkInputs = [
|
|
|
|
dateutil
|
|
|
|
mock
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
tornado
|
|
|
|
trustme
|
|
|
|
];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2021-03-14 08:10:25 +00:00
|
|
|
# Tests in urllib3 are mostly timeout-based instead of event-based and
|
|
|
|
# are therefore inherently flaky. On your own machine, the tests will
|
|
|
|
# typically build fine, but on a loaded cluster such as Hydra random
|
|
|
|
# timeouts will occur.
|
|
|
|
#
|
|
|
|
# The urllib3 test suite has two different timeouts in their test suite
|
|
|
|
# (see `test/__init__.py`):
|
|
|
|
# - SHORT_TIMEOUT
|
|
|
|
# - LONG_TIMEOUT
|
|
|
|
# When CI is in the env, LONG_TIMEOUT will be significantly increased.
|
|
|
|
# Still, failures can occur and for that reason tests are disabled.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export CI # Increases LONG_TIMEOUT
|
|
|
|
'';
|
2021-03-13 09:44:31 +00:00
|
|
|
|
2021-03-05 22:38:19 +00:00
|
|
|
pythonImportsCheck = [ "urllib3" ];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-09-05 10:04:42 +01:00
|
|
|
description = "Powerful, sanity-friendly HTTP client for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/shazow/urllib3";
|
2017-09-05 10:16:41 +01:00
|
|
|
license = licenses.mit;
|
2021-03-05 22:38:19 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
}
|