From c8ef06dfc669a477f3cbcc16d57b473072c509d7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 19 Jan 2025 21:14:48 +0100 Subject: [PATCH] python3Packages.confluent-kafka: 2.6.1 -> 2.8.0 https://github.com/confluentinc/confluent-kafka-python/blob/v2.8.0/CHANGELOG.md --- .../confluent-kafka/default.nix | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/confluent-kafka/default.nix b/pkgs/development/python-modules/confluent-kafka/default.nix index 1a7d54470677..56c6d545a2e4 100644 --- a/pkgs/development/python-modules/confluent-kafka/default.nix +++ b/pkgs/development/python-modules/confluent-kafka/default.nix @@ -1,24 +1,35 @@ { lib, avro, + azure-identity, + azure-keyvault-keys, + boto3, buildPythonPackage, + cacert, + cachetools, fastavro, fetchFromGitHub, + google-auth, + google-api-core, + google-cloud-kms, + hvac, jsonschema, protobuf, pyflakes, pyrsistent, pytestCheckHook, pythonOlder, + pyyaml, rdkafka, requests, requests-mock, + respx, setuptools, }: buildPythonPackage rec { pname = "confluent-kafka"; - version = "2.6.1"; + version = "2.8.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -27,7 +38,7 @@ buildPythonPackage rec { owner = "confluentinc"; repo = "confluent-kafka-python"; tag = "v${version}"; - hash = "sha256-SFmZ/KriysvLkGT5mvIS9SJcUHWmvZXrqFAY0lC6bGc="; + hash = "sha256-EDEp260G/t7s17RlbT+Bcl7FZlVQFagNijDNw53DFpY="; }; buildInputs = [ rdkafka ]; @@ -49,14 +60,35 @@ buildPythonPackage rec { protobuf requests ]; + rules = [ + azure-identity + azure-keyvault-keys + boto3 + # TODO: cel-python + google-auth + google-api-core + google-cloud-kms + # hkdf was removed + hvac + # TODO: jsonata-python + pyyaml + # TODO: tink + ]; schema-registry = [ requests ]; }; nativeCheckInputs = [ + cachetools pyflakes pytestCheckHook requests-mock - ] ++ lib.flatten (builtins.attrValues optional-dependencies); + respx + ] ++ lib.flatten (lib.attrValues optional-dependencies); + + preCheck = '' + # httpx since 0.28.0+ depends on SSL_CERT_FILE + SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt + ''; pythonImportsCheck = [ "confluent_kafka" ]; @@ -64,12 +96,16 @@ buildPythonPackage rec { "tests/integration/" "tests/test_Admin.py" "tests/test_misc.py" + # missing cel-python dependency + "tests/schema_registry/test_avro_serdes.py" + "tests/schema_registry/test_json_serdes.py" + "tests/schema_registry/test_proto_serdes.py" ]; meta = with lib; { description = "Confluent's Apache Kafka client for Python"; homepage = "https://github.com/confluentinc/confluent-kafka-python"; - changelog = "https://github.com/confluentinc/confluent-kafka-python/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/confluentinc/confluent-kafka-python/blob/${src.tag}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ mlieberman85 ]; };