From 2bc68e22cac0a44f2e5660e334097a84f17acb28 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 20 Nov 2024 20:44:21 +0100 Subject: [PATCH] python312Packages.opensearch-py: fix build --- .../python-modules/opensearch-py/default.nix | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/opensearch-py/default.nix b/pkgs/development/python-modules/opensearch-py/default.nix index 0914a8ca67014..5557ea3e21b1c 100644 --- a/pkgs/development/python-modules/opensearch-py/default.nix +++ b/pkgs/development/python-modules/opensearch-py/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -62,6 +63,8 @@ buildPythonPackage rec { pytz ] ++ optional-dependencies.async; + __darwinAllowLocalNetworking = true; + disabledTestPaths = [ # require network "test_opensearchpy/test_async/test_connection.py" @@ -70,11 +73,21 @@ buildPythonPackage rec { "test_opensearchpy/test_server_secured" ]; - disabledTests = [ - # finds our ca-bundle, but expects something else (/path/to/clientcert/dir or None) - "test_ca_certs_ssl_cert_dir" - "test_no_ca_certs" - ]; + disabledTests = + [ + # finds our ca-bundle, but expects something else (/path/to/clientcert/dir or None) + "test_ca_certs_ssl_cert_dir" + "test_no_ca_certs" + + # Failing tests, issue opened at https://github.com/opensearch-project/opensearch-py/issues/849 + "test_basicauth_in_request_session" + "test_callable_in_request_session" + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86) [ + # Flaky tests: OSError: [Errno 48] Address already in use + "test_redirect_failure_when_allow_redirect_false" + "test_redirect_success_when_allow_redirect_true" + ]; meta = { description = "Python low-level client for OpenSearch";