Skip to content

Commit b783196

Browse files
committed
Merge master
2 parents b88b020 + 8b9afc0 commit b783196

39 files changed

+1001
-168
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ tmp-KafkaCluster
3030
venv_test
3131
venv_examples
3232
*Zone.Identifier
33+
.coverage
34+
**/coverage.xml
35+
**/test-report.xml

.semaphore/semaphore.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ execution_time_limit:
88
global_job_config:
99
env_vars:
1010
- name: LIBRDKAFKA_VERSION
11-
value: v2.6.1
11+
value: v2.8.0
1212
prologue:
1313
commands:
1414
- checkout
@@ -176,7 +176,7 @@ blocks:
176176
task:
177177
agent:
178178
machine:
179-
type: s1-prod-ubuntu20-04-amd64-2
179+
type: s1-prod-ubuntu20-04-amd64-3
180180
env_vars:
181181
- name: OS_NAME
182182
value: linux
@@ -201,6 +201,18 @@ blocks:
201201
- chmod u+r+x tools/source-package-verification.sh
202202
- export TEST_CONSUMER_GROUP_PROTOCOL=consumer
203203
- tools/source-package-verification.sh
204+
- name: Build, Test, and Report coverage
205+
commands:
206+
- sem-version python 3.9
207+
# use a virtualenv
208+
- python3 -m venv _venv && source _venv/bin/activate
209+
- chmod u+r+x tools/source-package-verification.sh
210+
- export RUN_COVERAGE=true
211+
- tools/source-package-verification.sh
212+
- mkdir test-output
213+
- cp test-report.xml test-output
214+
- test-results publish test-output
215+
- artifact push workflow coverage.xml
204216
- name: "Source package verification with Python 3 (Linux arm64)"
205217
dependencies: []
206218
task:
@@ -285,3 +297,16 @@ blocks:
285297
- cd ..
286298
- artifact push project artifacts/confluent-kafka-python-wheels-${SEMAPHORE_GIT_TAG_NAME}-${SEMAPHORE_WORKFLOW_ID}.tgz --destination confluent-kafka-python-wheels-${SEMAPHORE_GIT_TAG_NAME}-${SEMAPHORE_WORKFLOW_ID}.tgz
287299
- echo Thank you
300+
301+
after_pipeline:
302+
task:
303+
agent:
304+
machine:
305+
type: s1-prod-ubuntu20-04-amd64-1
306+
jobs:
307+
- name: SonarQube
308+
commands:
309+
- checkout
310+
- sem-version java 11
311+
- artifact pull workflow coverage.xml
312+
- emit-sonarqube-data --run_only_sonar_scan

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Confluent's Python client for Apache Kafka
22

3+
## v2.8.2
4+
5+
v2.8.2 is a maintenance release with the following fixes and enhancements:
6+
7+
- Fixed caching to ensure cached schema matches input. (#1922)
8+
- Fix handling of named Avro schemas (#1928)
9+
10+
confluent-kafka-python v2.8.2 is based on librdkafka v2.8.0, see the
11+
[librdkafka release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.8.0)
12+
for a complete list of changes, enhancements, fixes and upgrade considerations.
13+
14+
Note: Versioning is skipped due to breaking change in v2.8.1.
15+
Do not run software with v2.8.1 installed.
16+
17+
18+
## v2.8.0
19+
20+
v2.8.0 is a feature release with the features, fixes and enhancements:
21+
22+
confluent-kafka-python v2.8.0 is based on librdkafka v2.8.0, see the
23+
[librdkafka release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.8.0)
24+
for a complete list of changes, enhancements, fixes and upgrade considerations.
25+
26+
327
## v2.7.0
428

529
v2.7.0 is a feature release with the features, fixes and enhancements present in v2.6.2 including the following fix:
@@ -10,6 +34,7 @@ confluent-kafka-python v2.7.0 is based on librdkafka v2.6.1, see the
1034
[librdkafka release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.1)
1135
for a complete list of changes, enhancements, fixes and upgrade considerations.
1236

37+
1338
## v2.6.2
1439

1540
> [!WARNING]

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include README.md
2+
include LICENSE
23
include src/confluent_kafka/src/*.[ch]
34
prune tests
45
prune docs

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# built documents.
2828
#
2929
# The short X.Y version.
30-
version = '2.7.0'
30+
version = '2.8.2'
3131
# The full version, including alpha/beta/rc tags.
3232
release = version
3333
######################################################################

examples/avro_consumer_encryption.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,15 @@ def main(args):
9898

9999
sr_conf = {'url': args.schema_registry}
100100
schema_registry_client = SchemaRegistryClient(sr_conf)
101+
rule_conf = None
102+
# KMS credentials can be passed as follows
103+
# rule_conf = {'secret.access.key': 'xxx', 'access.key.id': 'yyy'}
104+
# Alternatively, the KMS credentials can be set via environment variables
101105

102106
avro_deserializer = AvroDeserializer(schema_registry_client,
103107
schema_str,
104-
dict_to_user)
108+
dict_to_user,
109+
rule_conf=rule_conf)
105110

106111
consumer_conf = {'bootstrap.servers': args.bootstrap_servers,
107112
'group.id': args.group,

examples/docker/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FROM alpine:3.12
3030

3131
COPY . /usr/src/confluent-kafka-python
3232

33-
ENV LIBRDKAFKA_VERSION v2.6.1
33+
ENV LIBRDKAFKA_VERSION v2.8.0
3434
ENV KAFKACAT_VERSION master
3535

3636

examples/json_consumer_encryption.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,15 @@ def main(args):
9595

9696
sr_conf = {'url': args.schema_registry}
9797
schema_registry_client = SchemaRegistryClient(sr_conf)
98+
rule_conf = None
99+
# KMS credentials can be passed as follows
100+
# rule_conf = {'secret.access.key': 'xxx', 'access.key.id': 'yyy'}
101+
# Alternatively, the KMS credentials can be set via environment variables
98102

99103
json_deserializer = JSONDeserializer(schema_str,
100104
dict_to_user,
101-
schema_registry_client)
105+
schema_registry_client,
106+
rule_conf=rule_conf)
102107

103108
consumer_conf = {'bootstrap.servers': args.bootstrap_servers,
104109
'group.id': args.group,

examples/protobuf_consumer_encryption.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,15 @@ def main(args):
6969

7070
sr_conf = {'url': args.schema_registry}
7171
schema_registry_client = SchemaRegistryClient(sr_conf)
72+
rule_conf = None
73+
# KMS credentials can be passed as follows
74+
# rule_conf = {'secret.access.key': 'xxx', 'access.key.id': 'yyy'}
75+
# Alternatively, the KMS credentials can be set via environment variables
7276

7377
protobuf_deserializer = ProtobufDeserializer(user_pb2.User,
7478
{'use.deprecated.format': False},
75-
schema_registry_client)
79+
schema_registry_client,
80+
rule_conf=rule_conf)
7681

7782
consumer_conf = {'bootstrap.servers': args.bootstrap_servers,
7883
'group.id': args.group,

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "confluent-kafka"
7-
version = "2.7.0"
7+
version = "2.8.2"
88
description = "Confluent's Python client for Apache Kafka"
99
classifiers = [
1010
"Development Status :: 5 - Production/Stable",
@@ -14,7 +14,6 @@ classifiers = [
1414
"Programming Language :: Python :: 3",
1515
"Topic :: Software Development :: Libraries :: Python Modules"]
1616
readme = "README.md"
17-
license = { file = "LICENSE" }
1817
requires-python = ">=3.7"
1918
dynamic = ["dependencies", "optional-dependencies"]
2019

@@ -25,12 +24,16 @@ email = "support@confluent.io"
2524
[project.urls]
2625
Homepage = "https://github.com/confluentinc/confluent-kafka-python"
2726

27+
[tool.mypy]
28+
ignore_missing_imports = true
29+
2830
[tool.setuptools]
2931
include-package-data = false
3032

3133
[tool.setuptools.dynamic]
3234
dependencies = {file = ["requirements/requirements.txt"]}
3335
optional-dependencies.schemaregistry = { file = ["requirements/requirements-schemaregistry.txt"] }
36+
optional-dependencies.schema_registry = { file = ["requirements/requirements-schemaregistry.txt"] }
3437
optional-dependencies.rules = { file = ["requirements/requirements-rules.txt", "requirements/requirements-schemaregistry.txt"] }
3538
optional-dependencies.avro = { file = ["requirements/requirements-avro.txt", "requirements/requirements-schemaregistry.txt"] }
3639
optional-dependencies.json = { file = ["requirements/requirements-json.txt", "requirements/requirements-schemaregistry.txt"] }

requirements/requirements-examples.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ six
66

77
attrs
88
cachetools
9-
# Temporary constraint due to https://github.com/lundberg/respx/issues/277
10-
httpx<0.28.0
9+
httpx
1110

1211
fastavro < 1.8.0; python_version == "3.7"
1312
fastavro < 2; python_version > "3.7"

requirements/requirements-rules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
azure-identity
22
azure-keyvault-keys
3-
boto3
3+
boto3>=1.35
44
cel-python>=0.1.5
55
google-auth
66
google-api-core
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
attrs
22
cachetools
3-
# Temporary constraint due to https://github.com/lundberg/respx/issues/277
4-
httpx<0.28.0
3+
httpx>=0.26
4+
authlib

requirements/requirements-tests.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# core test requirements
2-
urllib3<2.0.0;python_version<="3.7"
3-
urllib3 >= 2.0.0,<3; python_version > "3.7"
2+
urllib3<2; python_version<="3.7"
3+
urllib3<3; python_version>"3.7"
44
flake8
5+
orjson
56
pytest
67
pytest-timeout
78
requests-mock
8-
respx
9+
respx
10+
pytest_cov

service.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ git:
66
github:
77
enable: true
88
repo_name: confluentinc/confluent-kafka-python
9+
sonarqube:
10+
enable: true
11+
coverage_exclusions:
12+
- "**/*.pb.*"
13+
- "**/mk-include/**/*"
14+
- "examples/**"
915
semaphore:
1016
enable: true
1117
pipeline_enable: false

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### service-bot sonarqube plugin managed file
22
sonar.coverage.exclusions=**/test/**/*,**/tests/**/*,**/mock/**/*,**/mocks/**/*,**/*mock*,**/*test*
33
sonar.cpd.exclusions=**/test/**/*,**/tests/**/*,**/mock/**/*,**/mocks/**/*,**/*mock*,**/*test*
4-
sonar.exclusions=**/*.pb.*,**/mk-include/**/*
4+
sonar.exclusions=**/*.pb.*,**/mk-include/**/*,examples/**
55
sonar.language=python
66
sonar.projectKey=confluent-kafka-python
77
sonar.python.coverage.reportPaths=**/coverage.xml

0 commit comments

Comments
 (0)