Skip to content

Commit 2b80847

Browse files
committed
Fix the incompatibility with Python 3.12 and drop the support for 3.7
### Motivation The `avro` component cannot be installed with Python 3.12 because the depended `fastavro` dependency is 1.7.3, which is not compatible with Python 3.12. However, the newer fastavro dependencies all do not support Python 3.7, which has already reached the EOL (2023-06-27). ### Modifications - Upgrade the fastavro dependency to 1.9.2 - Add the workflows to run tests for the lowest and highest supported Python versions (3.8 and 3.12). - Fix the documents
1 parent d278416 commit 2b80847

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

.github/workflows/ci-build-release-wheels.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
- {name: 'manylinux2014', py_suffix: ''}
4242
- {name: 'manylinux_musl', py_suffix: '-alpine'}
4343
python:
44-
- {version: '3.7', spec: 'cp37-cp37m'}
4544
- {version: '3.8', spec: 'cp38-cp38'}
4645
- {version: '3.9', spec: 'cp39-cp39'}
4746
- {version: '3.10', spec: 'cp310-cp310'}
@@ -103,7 +102,6 @@ jobs:
103102
fail-fast: false
104103
matrix:
105104
py:
106-
- {version: '3.7', version_long: '3.7.15'}
107105
- {version: '3.8', version_long: '3.8.13'}
108106
- {version: '3.9', version_long: '3.9.14'}
109107
- {version: '3.10', version_long: '3.10.7'}
@@ -156,7 +154,6 @@ jobs:
156154
fail-fast: false
157155
matrix:
158156
python:
159-
- {version: '3.7'}
160157
- {version: '3.8'}
161158
- {version: '3.9'}
162159
- {version: '3.10'}

.github/workflows/ci-pr-validation.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,22 @@ jobs:
4747
pulsar
4848
4949
unit-tests:
50-
name: Run unit tests
50+
name: Run unit tests for Python ${{matrix.version}}
5151
runs-on: ubuntu-22.04
5252
timeout-minutes: 120
5353

54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
version: ['3.8', '3.12']
58+
5459
steps:
5560
- name: checkout
56-
uses: actions/checkout@v3
61+
uses: actions/checkout@v4
62+
63+
- uses: actions/setup-python@v5
64+
with:
65+
python-version: "${{matrix.version}}"
5766

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

6776
- name: Python install
6877
run: |
69-
./setup.py bdist_wheel
78+
python3 -m pip install -U pip setuptools wheel requests
79+
python3 setup.py bdist_wheel
7080
WHEEL=$(find dist -name '*.whl')
7181
pip3 install ${WHEEL}[avro]
7282
@@ -90,7 +100,7 @@ jobs:
90100
- name: Test functions install
91101
run: |
92102
WHEEL=$(find dist -name '*.whl')
93-
pip3 install ${WHEEL}[functions] --force-reinstall
103+
pip3 install ${WHEEL}[all] --force-reinstall
94104
95105
linux-wheel:
96106
name: Wheel ${{matrix.image.name}} - Py ${{matrix.python.version}} - ${{matrix.cpu.platform}}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pulsar Python clients support a variety of Pulsar features to enable building ap
2525

2626
## Requirements
2727

28-
- Python >= 3.7
28+
- Python 3.8, 3.9, 3.10, 3.11, 3.12
2929
- A C++ compiler that supports C++11
3030
- CMake >= 3.18
3131
- [Pulsar C++ client library](https://github.com/apache/pulsar-client-cpp)

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ stay open for at least 72 hours ***
132132
Python wheels:
133133
https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-python-X.Y.Z-candidate-N/
134134
135-
The supported python versions are 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12. The
135+
The supported python versions are 3.8, 3.9, 3.10, 3.11 and 3.12. The
136136
supported platforms and architectures are:
137137
- Windows x86_64 (windows/)
138138
- glibc-based Linux x86_64 (linux-glibc-x86_64/)

build-support/install-dependencies.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ set -e -x
2222

2323
cd `dirname $0`
2424

25+
python3 -m pip install pyyaml
2526
CPP_CLIENT_VERSION=$(./dep-version.py pulsar-cpp ../dependencies.yaml)
2627
PYBIND11_VERSION=$(./dep-version.py pybind11 ../dependencies.yaml)
2728
source ./dep-url.sh

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def build_extension(self, ext):
9090
# avro dependencies
9191
extras_require["avro"] = sorted(
9292
{
93-
"fastavro==1.7.3"
93+
"fastavro>=1.9.2"
9494
}
9595
)
9696

0 commit comments

Comments
 (0)