diff options
Diffstat (limited to 'pkgs/development/python-modules/requests/default.nix')
-rw-r--r-- | pkgs/development/python-modules/requests/default.nix | 101 |
1 files changed, 51 insertions, 50 deletions
diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix index 33749a992471..6ffe869c0a6a 100644 --- a/pkgs/development/python-modules/requests/default.nix +++ b/pkgs/development/python-modules/requests/default.nix @@ -1,24 +1,24 @@ -{ lib -, stdenv -, brotlicffi -, buildPythonPackage -, certifi -, chardet -, charset-normalizer -, fetchPypi -, fetchpatch -, idna -, pysocks -, pytest-mock -, pytest-xdist -, pytestCheckHook -, pythonOlder -, urllib3 +{ + lib, + stdenv, + brotlicffi, + buildPythonPackage, + certifi, + chardet, + charset-normalizer, + fetchPypi, + idna, + pysocks, + pytest-mock, + pytest-xdist, + pytestCheckHook, + pythonOlder, + urllib3, }: buildPythonPackage rec { pname = "requests"; - version = "2.31.0"; + version = "2.32.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -27,9 +27,15 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-lCxadY+Y15Dq7Ropy27vx/+w0c968Fw9J5Flbb1q0eE="; + hash = "sha256-VTZUF3NOsYJVWQqf+euX6eHaho1MzWQCOZ6vaK8gp2A="; }; + patches = [ + # https://github.com/psf/requests/issues/6730 + # https://github.com/psf/requests/pull/6731 + ./ca-load-regression.patch + ]; + dependencies = [ brotlicffi certifi @@ -39,50 +45,45 @@ buildPythonPackage rec { ]; optional-dependencies = { - security = []; - socks = [ - pysocks - ]; - use_chardet_on_py3 = [ - chardet - ]; + security = [ ]; + socks = [ pysocks ]; + use_chardet_on_py3 = [ chardet ]; }; nativeCheckInputs = [ pytest-mock pytest-xdist pytestCheckHook - ] - ++ optional-dependencies.socks; + ] ++ optional-dependencies.socks; - 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" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ - # Fatal Python error: Aborted - "test_basic_response" - "test_text_response" - ]; + 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" + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ + # Fatal Python error: Aborted + "test_basic_response" + "test_text_response" + ]; - disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Fatal Python error: Aborted "tests/test_lowlevel.py" ]; - pythonImportsCheck = [ - "requests" - ]; + pythonImportsCheck = [ "requests" ]; meta = with lib; { description = "HTTP library for Python"; |