19 buildPythonPackage rec {
22 format = "setuptools";
24 disabled = pythonOlder "3.7";
26 __darwinAllowLocalNetworking = true;
29 inherit pname version;
30 hash = "sha256-VTZUF3NOsYJVWQqf+euX6eHaho1MzWQCOZ6vaK8gp2A=";
34 # https://github.com/psf/requests/issues/6730
35 # https://github.com/psf/requests/pull/6731
36 ./ca-load-regression.patch
47 optional-dependencies = {
50 use_chardet_on_py3 = [ chardet ];
57 ] ++ optional-dependencies.socks;
61 # Disable tests that require network access and use httpbin
62 "requests.api.request"
63 "requests.models.PreparedRequest"
64 "requests.sessions.Session"
66 "test_redirecting_to_bad_url"
67 "test_requests_are_updated_each_time"
68 "test_should_bypass_proxies_pass_only_hostname"
69 "test_urllib3_pool_connection_closed"
70 "test_urllib3_retries"
71 "test_use_proxy_from_environment"
75 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
76 # Fatal Python error: Aborted
81 disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
82 # Fatal Python error: Aborted
83 "tests/test_lowlevel.py"
86 pythonImportsCheck = [ "requests" ];
89 description = "HTTP library for Python";
90 homepage = "http://docs.python-requests.org/";
91 changelog = "https://github.com/psf/requests/blob/v${version}/HISTORY.md";
92 license = licenses.asl20;
93 maintainers = with maintainers; [ fab ];