From ad4cf47e18d19b05110984baa566c10b64d588f6 Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Tue, 1 Oct 2024 01:39:07 +0530 Subject: [PATCH 01/10] Added py3.13 in cibuildwheel --- tools/build-manylinux.sh | 2 +- tools/mingw-w64/semaphore_commands.sh | 2 +- tools/wheels/build-wheels.bat | 2 +- tools/wheels/build-wheels.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/build-manylinux.sh b/tools/build-manylinux.sh index 1bbf501ce..9b8f17d69 100755 --- a/tools/build-manylinux.sh +++ b/tools/build-manylinux.sh @@ -15,7 +15,7 @@ # docker run -t -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64:latest /io/tools/build-manylinux.sh LIBRDKAFKA_VERSION=$1 -PYTHON_VERSIONS=("cp36" "cp37" "cp38" "cp39" "cp310" "cp311" "cp312") +PYTHON_VERSIONS=("cp36" "cp37" "cp38" "cp39" "cp310" "cp311" "cp312" "cp313") if [[ -z "$LIBRDKAFKA_VERSION" ]]; then echo "Usage: $0 " diff --git a/tools/mingw-w64/semaphore_commands.sh b/tools/mingw-w64/semaphore_commands.sh index f0a751ac0..3adc186d5 100644 --- a/tools/mingw-w64/semaphore_commands.sh +++ b/tools/mingw-w64/semaphore_commands.sh @@ -8,4 +8,4 @@ export MAKE=mingw32-make # so that Autotools can find it cmd /c mklink /D C:\Python38\python3.exe C:\Python38\python.exe -python -m pip install cibuildwheel==2.16.2 +python -m pip install cibuildwheel==2.21.1 diff --git a/tools/wheels/build-wheels.bat b/tools/wheels/build-wheels.bat index 5e7203407..793daae65 100644 --- a/tools/wheels/build-wheels.bat +++ b/tools/wheels/build-wheels.bat @@ -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% cp311-%BW_ARCH% cp312-%BW_ARCH% +set CIBW_BUILD=cp36-%BW_ARCH% cp37-%BW_ARCH% cp38-%BW_ARCH% cp39-%BW_ARCH% cp310-%BW_ARCH% cp311-%BW_ARCH% cp312-%BW_ARCH% cp313-%BW_ARCH% set CIBW_BEFORE_BUILD=python -m pip install delvewheel==1.1.4 set CIBW_TEST_REQUIRES=-r tests/requirements.txt set CIBW_TEST_COMMAND=pytest {project}\tests\test_Producer.py diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index c0f21f882..848039e9a 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -18,7 +18,7 @@ export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux_2_28" librdkafka_version=$1 wheeldir=$2 -cibuildwheel_version="2.16.2" +cibuildwheel_version="2.21.1" if [[ -z $wheeldir ]]; then echo "Usage: $0 " From ce037145e37243b87861b273b43df03d71ba3325 Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:58:45 +0530 Subject: [PATCH 02/10] Fixing issue while installing jsonschema latest version --- examples/requirements.txt | 2 +- setup.py | 2 +- src/confluent_kafka/schema_registry/requirements.txt | 2 +- tests/requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/requirements.txt b/examples/requirements.txt index 5be5932d9..3f434b94d 100644 --- a/examples/requirements.txt +++ b/examples/requirements.txt @@ -5,6 +5,6 @@ uvicorn six pyrsistent==0.16.1;python_version<"3.0" pyrsistent;python_version>"3.0" -jsonschema +jsonschema<4.18.0 protobuf requests diff --git a/setup.py b/setup.py index fe12df2d6..0b771dc5e 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ JSON_REQUIRES = ['pyrsistent==0.16.1;python_version<"3.0"', 'pyrsistent;python_version>"3.0"', - 'jsonschema'] + SCHEMA_REGISTRY_REQUIRES + 'jsonschema<4.18.0'] + SCHEMA_REGISTRY_REQUIRES PROTO_REQUIRES = ['protobuf'] + SCHEMA_REGISTRY_REQUIRES diff --git a/src/confluent_kafka/schema_registry/requirements.txt b/src/confluent_kafka/schema_registry/requirements.txt index 83c8d721e..c538fbde0 100644 --- a/src/confluent_kafka/schema_registry/requirements.txt +++ b/src/confluent_kafka/schema_registry/requirements.txt @@ -1,6 +1,6 @@ fastavro>=0.23.0 pyrsistent==0.16.1;python_version<"3.0" pyrsistent;python_version>"3.0" -jsonschema +jsonschema<4.18.0 # Due to https://github.com/tfranzel/drf-spectacular/issues/1132 protobuf requests diff --git a/tests/requirements.txt b/tests/requirements.txt index b5e20efb2..d13eea687 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -10,5 +10,5 @@ fastavro<1.8.0;python_version=="3.7" fastavro>=1.8.4;python_version>"3.7" fastavro avro>=1.11.1,<2 -jsonschema +jsonschema<4.18.0 protobuf From 205986ccda88f859c904f1c902f9db5db2b9f93f Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:09:10 +0530 Subject: [PATCH 03/10] Fixing request mock build --- tools/build-manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build-manylinux.sh b/tools/build-manylinux.sh index 9b8f17d69..daa0c9077 100755 --- a/tools/build-manylinux.sh +++ b/tools/build-manylinux.sh @@ -51,7 +51,7 @@ fi # echo "# Installing basic system dependencies" -yum install -y zlib-devel gcc-c++ python3 curl-devel perl-IPC-Cmd perl-Pod-Html +yum install -y zlib-devel gcc-c++ python3 curl-devel perl-IPC-Cmd perl-Pod-Html libffi-devel echo "# Building librdkafka ${LIBRDKAFKA_VERSION}" $(dirname $0)/bootstrap-librdkafka.sh --require-ssl ${LIBRDKAFKA_VERSION} /usr From 05b331eabfb837ee92073b84fa5e75a60295409b Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:48:59 +0530 Subject: [PATCH 04/10] Removed installing test requirements as we are only testing the producer --- tools/build-manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build-manylinux.sh b/tools/build-manylinux.sh index daa0c9077..4c0363fdc 100755 --- a/tools/build-manylinux.sh +++ b/tools/build-manylinux.sh @@ -92,7 +92,7 @@ for PYBIN in /opt/python/cp*/bin; do "${PYBIN}/pip" -V "${PYBIN}/pip" install --no-index -f /io/wheelhouse confluent_kafka "${PYBIN}/python" -c 'import confluent_kafka; print(confluent_kafka.libversion())' - "${PYBIN}/pip" install -r /io/tests/requirements.txt + # "${PYBIN}/pip" install -r /io/tests/requirements.txt "${PYBIN}/pytest" /io/tests/test_Producer.py echo "## Uninstalling $PYBIN" "${PYBIN}/pip" uninstall -y confluent_kafka From 50f103f6c19b0aaa86f220d612f76711828e731b Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Thu, 3 Oct 2024 00:43:47 +0530 Subject: [PATCH 05/10] Added pytest installation for testing the generated wheels --- tools/build-manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build-manylinux.sh b/tools/build-manylinux.sh index 4c0363fdc..70a115f25 100755 --- a/tools/build-manylinux.sh +++ b/tools/build-manylinux.sh @@ -92,7 +92,7 @@ for PYBIN in /opt/python/cp*/bin; do "${PYBIN}/pip" -V "${PYBIN}/pip" install --no-index -f /io/wheelhouse confluent_kafka "${PYBIN}/python" -c 'import confluent_kafka; print(confluent_kafka.libversion())' - # "${PYBIN}/pip" install -r /io/tests/requirements.txt + "${PYBIN}/pip" install pytest "${PYBIN}/pytest" /io/tests/test_Producer.py echo "## Uninstalling $PYBIN" "${PYBIN}/pip" uninstall -y confluent_kafka From d401d3e7338f5cbdd4edc6ac9fc6d17aea3b158f Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:11:44 +0530 Subject: [PATCH 06/10] Updated MACOSX_DEPLOYMENT_TARGET to 10.9 to fix macos wheel generation --- tools/wheels/build-wheels.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index 848039e9a..a6e15661c 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -45,6 +45,8 @@ case $OSTYPE in lib_dir=dest/runtimes/osx-$ARCH/native export CFLAGS="-I${PWD}/dest/build/native/include" export LDFLAGS="-L${PWD}/$lib_dir" + echo $MACOSX_DEPLOYMENT_TARGET + export MACOSX_DEPLOYMENT_TARGET=10.9 ;; *) echo "$0: Unsupported OSTYPE $OSTYPE" From 87123b3fae0728cc6c80d9da53a6c5f3ff7a7bcc Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:52:03 +0530 Subject: [PATCH 07/10] Specifying MACOSX_DEPLOYMENT_TARGET for wheel generation in cibuildwheel --- tools/wheels/build-wheels.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index a6e15661c..8316bebbc 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -14,6 +14,7 @@ export CIBW_TEST_REQUIRES="-r tests/requirements.txt" export CIBW_TEST_COMMAND="pytest {project}/tests/test_Producer.py" export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_28" export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux_2_28" +export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET=10.9" librdkafka_version=$1 From 92aa22289742a4031f8cf3bdcd34f326323b3441 Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:31:19 +0530 Subject: [PATCH 08/10] Pinning delocate version --- tools/wheels/build-wheels.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index 8316bebbc..1d45018c0 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -14,8 +14,7 @@ export CIBW_TEST_REQUIRES="-r tests/requirements.txt" export CIBW_TEST_COMMAND="pytest {project}/tests/test_Producer.py" export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_28" export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux_2_28" -export CIBW_ENVIRONMENT_MACOS="MACOSX_DEPLOYMENT_TARGET=10.9" - +export CIBW_BEFORE_ALL_MACOS="pip install delocate=0.10.7" librdkafka_version=$1 wheeldir=$2 @@ -46,8 +45,6 @@ case $OSTYPE in lib_dir=dest/runtimes/osx-$ARCH/native export CFLAGS="-I${PWD}/dest/build/native/include" export LDFLAGS="-L${PWD}/$lib_dir" - echo $MACOSX_DEPLOYMENT_TARGET - export MACOSX_DEPLOYMENT_TARGET=10.9 ;; *) echo "$0: Unsupported OSTYPE $OSTYPE" From 6acf1bc4783e2165d08ba5774a5f1512a6aac818 Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:36:52 +0530 Subject: [PATCH 09/10] Upgrade cibuildwheel version --- tools/mingw-w64/semaphore_commands.sh | 2 +- tools/wheels/build-wheels.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mingw-w64/semaphore_commands.sh b/tools/mingw-w64/semaphore_commands.sh index 3adc186d5..cce5ce999 100644 --- a/tools/mingw-w64/semaphore_commands.sh +++ b/tools/mingw-w64/semaphore_commands.sh @@ -8,4 +8,4 @@ export MAKE=mingw32-make # so that Autotools can find it cmd /c mklink /D C:\Python38\python3.exe C:\Python38\python.exe -python -m pip install cibuildwheel==2.21.1 +python -m pip install cibuildwheel==2.21.2 diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index 1d45018c0..e8cd46f45 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -18,7 +18,7 @@ export CIBW_BEFORE_ALL_MACOS="pip install delocate=0.10.7" librdkafka_version=$1 wheeldir=$2 -cibuildwheel_version="2.21.1" +cibuildwheel_version="2.21.2" if [[ -z $wheeldir ]]; then echo "Usage: $0 " From 6dea0deb3fab9406c5a2be2e2c78799b324d8f88 Mon Sep 17 00:00:00 2001 From: Pranav Rathi <4427674+pranavrth@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:54:04 +0530 Subject: [PATCH 10/10] Fix a type with delocate installation --- tools/wheels/build-wheels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/wheels/build-wheels.sh b/tools/wheels/build-wheels.sh index e8cd46f45..cacdc7ac3 100755 --- a/tools/wheels/build-wheels.sh +++ b/tools/wheels/build-wheels.sh @@ -14,7 +14,7 @@ export CIBW_TEST_REQUIRES="-r tests/requirements.txt" export CIBW_TEST_COMMAND="pytest {project}/tests/test_Producer.py" export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_28" export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux_2_28" -export CIBW_BEFORE_ALL_MACOS="pip install delocate=0.10.7" +export CIBW_BEFORE_ALL_MACOS="pip install delocate==0.10.7" librdkafka_version=$1 wheeldir=$2