python3Packages:opensearch-py: fix build by cherrypicking upstream fix commit

codgician 8fa7c7ad f770149a

Changed files
+11 -1
pkgs
development
python-modules
opensearch-py
+11 -1
pkgs/development/python-modules/opensearch-py/default.nix
···
stdenv,
buildPythonPackage,
fetchFromGitHub,
+
fetchpatch,
# build-system
setuptools,
···
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 = [
···
"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"