From 8fa7c7ad4c13dd85474498bf1b557ff7b4e0b93e Mon Sep 17 00:00:00 2001 From: codgician <15964984+codgician@users.noreply.github.com> Date: Sat, 30 Aug 2025 21:48:46 +0800 Subject: [PATCH] python3Packages:opensearch-py: fix build by cherrypicking upstream fix commit --- .../python-modules/opensearch-py/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/opensearch-py/default.nix b/pkgs/development/python-modules/opensearch-py/default.nix index ec066248dde8..9da3f6d21d44 100644 --- a/pkgs/development/python-modules/opensearch-py/default.nix +++ b/pkgs/development/python-modules/opensearch-py/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch, # build-system setuptools, @@ -40,6 +41,15 @@ buildPythonPackage rec { hash = "sha256-IAEh+rB26Zqv7j5g2YIRZRCAtFbBngoh+w8Z4e2bY+M="; }; + patches = [ + # Remove delete event_loop fixture to fix test with pytest-asyncio 1.x + (fetchpatch { + name = "remove-delete-event-loop-fixture.patch"; + url = "https://github.com/opensearch-project/opensearch-py/commit/2f9eeaad3f7bd38518b23a59659ccf02fff19577.patch"; + hash = "sha256-ljg9GiXPOokrIRS+gF+W9DnZ71AzH8WmLeb3G7rLeK8="; + }) + ]; + nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ @@ -83,7 +93,7 @@ buildPythonPackage rec { "test_basicauth_in_request_session" "test_callable_in_request_session" ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86) [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Flaky tests: OSError: [Errno 48] Address already in use "test_redirect_failure_when_allow_redirect_false" "test_redirect_success_when_allow_redirect_true"