Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIENTS-2885: Wheel generation python 3.11 #1467

Merged
merged 5 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ jobs:
env: BUILD_WHEELS=1
script: tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse

- name: "Wheels: MacOSX x64"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Copy link
Member Author

@pranavrth pranavrth Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These wheels are generated with Semaphore as well. Travis requires credits for OS wheel generation.

if: tag is present
os: osx
language: shell
env: BUILD_WHEELS=1
script: tools/wheels/build-wheels.sh ${LIBRDKAFKA_VERSION#v} wheelhouse

install:
# Install interceptors
- tools/install-interceptors.sh
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Confluent's Python client for Apache Kafka


## v1.9.3
## Next Version

- Added metadata to `TopicPartition` type and `commit()` (#1410).
- Added `consumer.memberid()` for getting member id assigned to
the consumer in a consumer group (#1154).
- Added Python 3.11 wheels


## v1.9.2
Expand Down
16 changes: 8 additions & 8 deletions tests/test_Producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ def test_transaction_api():
# Any subsequent APIs will fail since init did not succeed.
with pytest.raises(KafkaException) as ex:
p.begin_transaction()
assert ex.value.args[0].code() == KafkaError._STATE
assert ex.value.args[0].retriable() is False
assert ex.value.args[0].code() == KafkaError._CONFLICT
assert ex.value.args[0].retriable() is True
assert ex.value.args[0].fatal() is False
assert ex.value.args[0].txn_requires_abort() is False

Expand All @@ -218,22 +218,22 @@ def test_transaction_api():
with pytest.raises(KafkaException) as ex:
p.send_offsets_to_transaction([TopicPartition("topic", 0, 123)],
group_metadata)
assert ex.value.args[0].code() == KafkaError._STATE
assert ex.value.args[0].retriable() is False
assert ex.value.args[0].code() == KafkaError._CONFLICT
assert ex.value.args[0].retriable() is True
assert ex.value.args[0].fatal() is False
assert ex.value.args[0].txn_requires_abort() is False

with pytest.raises(KafkaException) as ex:
p.commit_transaction(0.5)
assert ex.value.args[0].code() == KafkaError._STATE
assert ex.value.args[0].retriable() is False
assert ex.value.args[0].code() == KafkaError._CONFLICT
assert ex.value.args[0].retriable() is True
assert ex.value.args[0].fatal() is False
assert ex.value.args[0].txn_requires_abort() is False

with pytest.raises(KafkaException) as ex:
p.abort_transaction(0.5)
assert ex.value.args[0].code() == KafkaError._STATE
assert ex.value.args[0].retriable() is False
assert ex.value.args[0].code() == KafkaError._CONFLICT
assert ex.value.args[0].retriable() is True
assert ex.value.args[0].fatal() is False
assert ex.value.args[0].txn_requires_abort() is False

Expand Down
4 changes: 2 additions & 2 deletions tools/wheels/build-wheels.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set WHEELHOUSE=%4
if [%WHEELHOUSE%]==[] goto usage
echo on

set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH%
set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH%
set CIBW_BEFORE_BUILD=python -m pip install delvewheel==0.0.6
set CIBW_TEST_REQUIRES=-r tests/requirements.txt
set CIBW_TEST_COMMAND=pytest {project}\tests\test_Producer.py
Expand All @@ -25,7 +25,7 @@ set CIBW_REPAIR_WHEEL_COMMAND=python -m delvewheel repair --add-path %DLL_DIR% -

set PATH=%PATH%;c:\Program Files\Git\bin\

python -m pip install cibuildwheel==2.7.0 || goto :error
python -m pip install cibuildwheel==2.11.2 || goto :error

python -m cibuildwheel --output-dir %WHEELHOUSE% --platform windows || goto :error

Expand Down
2 changes: 1 addition & 1 deletion tools/wheels/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ esac

$this_dir/install-librdkafka.sh $librdkafka_version dest

install_pkgs=cibuildwheel==2.8.1
install_pkgs=cibuildwheel==2.11.2

python3 -m pip install ${PIP_INSTALL_OPTS} $install_pkgs ||
pip3 install ${PIP_INSTALL_OPTS} $install_pkgs
Expand Down