11 # optional-dependencies
26 self = buildPythonPackage rec {
32 inherit pname version;
33 hash = "sha256-59gUqB2tgebK8uyf3tsoTsyccwdrYmVFR8xkzNyuJuk=";
41 optional-dependencies = {
42 brotli = if isPyPy then [ brotlicffi ] else [ brotli ];
53 ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]
54 ++ lib.flatten (builtins.attrValues optional-dependencies);
56 # Tests in urllib3 are mostly timeout-based instead of event-based and
57 # are therefore inherently flaky. On your own machine, the tests will
58 # typically build fine, but on a loaded cluster such as Hydra random
59 # timeouts will occur.
61 # The urllib3 test suite has two different timeouts in their test suite
62 # (see `test/__init__.py`):
65 # When CI is in the env, LONG_TIMEOUT will be significantly increased.
66 # Still, failures can occur and for that reason tests are disabled.
69 passthru.tests.pytest = self.overridePythonAttrs (_: {
74 export CI # Increases LONG_TIMEOUT
77 pythonImportsCheck = [ "urllib3" ];
80 description = "Powerful, user-friendly HTTP client for Python";
81 homepage = "https://github.com/urllib3/urllib3";
82 changelog = "https://github.com/urllib3/urllib3/blob/${version}/CHANGES.rst";
83 license = licenses.mit;
84 maintainers = with maintainers; [ fab ];