Skip to content

Fix the incompatibility with Python 3.12 and drop the support for 3.7 #181

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

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 0 additions & 3 deletions .github/workflows/ci-build-release-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- {name: 'manylinux2014', py_suffix: ''}
- {name: 'manylinux_musl', py_suffix: '-alpine'}
python:
- {version: '3.7', spec: 'cp37-cp37m'}
- {version: '3.8', spec: 'cp38-cp38'}
- {version: '3.9', spec: 'cp39-cp39'}
- {version: '3.10', spec: 'cp310-cp310'}
Expand Down Expand Up @@ -103,7 +102,6 @@ jobs:
fail-fast: false
matrix:
py:
- {version: '3.7', version_long: '3.7.15'}
- {version: '3.8', version_long: '3.8.13'}
- {version: '3.9', version_long: '3.9.14'}
- {version: '3.10', version_long: '3.10.7'}
Expand Down Expand Up @@ -156,7 +154,6 @@ jobs:
fail-fast: false
matrix:
python:
- {version: '3.7'}
- {version: '3.8'}
- {version: '3.9'}
- {version: '3.10'}
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/ci-pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,22 @@ jobs:
pulsar

unit-tests:
name: Run unit tests
name: Run unit tests for Python ${{matrix.version}}
runs-on: ubuntu-22.04
timeout-minutes: 120

strategy:
fail-fast: false
matrix:
version: ['3.8', '3.12']

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "${{matrix.version}}"

- name: Install Pulsar C++ client
run: build-support/install-dependencies.sh
Expand All @@ -66,7 +75,8 @@ jobs:

- name: Python install
run: |
./setup.py bdist_wheel
python3 -m pip install -U pip setuptools wheel requests
python3 setup.py bdist_wheel
WHEEL=$(find dist -name '*.whl')
pip3 install ${WHEEL}[avro]

Expand All @@ -90,7 +100,7 @@ jobs:
- name: Test functions install
run: |
WHEEL=$(find dist -name '*.whl')
pip3 install ${WHEEL}[functions] --force-reinstall
pip3 install ${WHEEL}[all] --force-reinstall

linux-wheel:
name: Wheel ${{matrix.image.name}} - Py ${{matrix.python.version}} - ${{matrix.cpu.platform}}
Expand Down Expand Up @@ -153,7 +163,7 @@ jobs:
strategy:
matrix:
py:
- {version: '3.11', version_long: '3.11.1'}
- {version: '3.12', version_long: '3.12.0'}

steps:
- name: checkout
Expand Down Expand Up @@ -199,7 +209,7 @@ jobs:
fail-fast: false
matrix:
python:
- version: '3.11'
- version: '3.12'

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pulsar Python clients support a variety of Pulsar features to enable building ap

## Requirements

- Python >= 3.7
- Python 3.8, 3.9, 3.10, 3.11, 3.12
- A C++ compiler that supports C++11
- CMake >= 3.18
- [Pulsar C++ client library](https://github.com/apache/pulsar-client-cpp)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ stay open for at least 72 hours ***
Python wheels:
https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-python-X.Y.Z-candidate-N/

The supported python versions are 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12. The
The supported python versions are 3.8, 3.9, 3.10, 3.11 and 3.12. The
supported platforms and architectures are:
- Windows x86_64 (windows/)
- glibc-based Linux x86_64 (linux-glibc-x86_64/)
Expand Down
1 change: 1 addition & 0 deletions build-support/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set -e -x

cd `dirname $0`

python3 -m pip install pyyaml
CPP_CLIENT_VERSION=$(./dep-version.py pulsar-cpp ../dependencies.yaml)
PYBIND11_VERSION=$(./dep-version.py pybind11 ../dependencies.yaml)
source ./dep-url.sh
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def build_extension(self, ext):
# avro dependencies
extras_require["avro"] = sorted(
{
"fastavro==1.7.3"
"fastavro>=1.9.2"
}
)

Expand Down
2 changes: 1 addition & 1 deletion tests/schema_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class Example(Record):

self.assertIsNotNone(msg.schema_version())

self.assertEquals(b'\x00\x00\x00\x00\x00\x00\x00\x00', msg.schema_version().encode())
self.assertEqual(b'\x00\x00\x00\x00\x00\x00\x00\x00', msg.schema_version().encode())

self.assertEqual(r, msg.value())

Expand Down