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

pyproject.toml (PEP518), test with Python 3.12 #944

Merged
merged 4 commits into from
Nov 21, 2023
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
24 changes: 17 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
python-version: "3.8"
- name: Prepare C files to include
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade pip build
python -m pip install -r requirements-cython.txt
# Make sure we install to have all c files to be shiped with bundle
python -m pip install -vv -U . # We set -vv to see compiler exceptions/warnings
- name: Build source package
run: python setup.py sdist
run: python -m build --sdist
- name: Upload source package
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -51,14 +51,14 @@ jobs:
- name: Build wheels
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: '*-musllinux*'
CIBW_BEFORE_BUILD_LINUX: pip install -r requirements-cython.txt && yum install -y zlib-devel
# On windows and mac we should have z library preinstalled
CIBW_BEFORE_BUILD: pip install -r requirements-cython.txt
CIBW_BUILD_VERBOSITY: 2
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade pip
pip install cibuildwheel
cibuildwheel --output-dir dist
shell: bash
Expand All @@ -74,14 +74,18 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- python: "3.8"
aiokafka_whl: dist/aiokafka-*-cp38-cp38-win_amd64.whl
- python: "3.9"
aiokafka_whl: dist/aiokafka-*-cp39-cp39-win_amd64.whl
- python: "3.10"
aiokafka_whl: dist/aiokafka-*-cp310-cp310-win_amd64.whl
- python: "3.11"
aiokafka_whl: dist/aiokafka-*-cp311-cp311-win_amd64.whl
- python: "3.12"
aiokafka_whl: dist/aiokafka-*-cp312-cp312-win_amd64.whl

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -115,7 +119,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- python: "3.8"
aiokafka_whl: dist/aiokafka-*-cp38-cp38-macosx_10_9_x86_64.whl
Expand All @@ -125,6 +129,8 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp310-cp310-macosx_10_9_x86_64.whl
- python: "3.11"
aiokafka_whl: dist/aiokafka-*-cp311-cp311-macosx_10_9_x86_64.whl
- python: "3.12"
aiokafka_whl: dist/aiokafka-*-cp312-cp312-macosx_10_9_x86_64.whl

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -156,7 +162,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- python: "3.8"
aiokafka_whl: dist/aiokafka-*-cp38-cp38-manylinux*_x86_64.whl
Expand All @@ -166,6 +172,8 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp310-cp310-manylinux*_x86_64.whl
- python: "3.11"
aiokafka_whl: dist/aiokafka-*-cp311-cp311-manylinux*_x86_64.whl
- python: "3.12"
aiokafka_whl: dist/aiokafka-*-cp312-cp312-manylinux*_x86_64.whl

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -213,6 +221,8 @@ jobs:
aiokafka_whl: dist/aiokafka-*-cp310-cp310-manylinux*_aarch64.whl
- pyver: cp311-cp311
aiokafka_whl: dist/aiokafka-*-cp311-cp311-manylinux*_aarch64.whl
- pyver: cp312-cp312
aiokafka_whl: dist/aiokafka-*-cp312-cp312-manylinux*_aarch64.whl

steps:
- uses: actions/checkout@v2
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
strategy:
matrix:
include:
- python: "3.11"
- python: "3.12"
kafka: "2.8.1"
scala: "2.13"

Expand All @@ -224,39 +224,42 @@ jobs:
- python: "3.10"
kafka: "2.8.1"
scala: "2.13"
- python: "3.11"
kafka: "2.8.1"
scala: "2.13"

# Older brokers against latest python version
- python: "3.11"
- python: "3.12"
kafka: "0.9.0.1"
scala: "2.11"
- python: "3.11"
- python: "3.12"
kafka: "0.10.2.1"
scala: "2.11"
- python: "3.11"
- python: "3.12"
kafka: "0.11.0.3"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "1.1.1"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.1.1"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.2.2"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.3.1"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.4.1"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.5.1"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.6.3"
scala: "2.12"
- python: "3.11"
- python: "3.12"
kafka: "2.7.2"
scala: "2.13"
fail-fast: false
Expand Down
72 changes: 72 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[build-system]
requires = ["setuptools >=61", "wheel", "Cython >=3.0.5"]

[project]
name = "aiokafka"
description = "Kafka integration with asyncio"
readme = "README.rst"
requires-python = ">=3.8"
license = { file = "LICENSE" }
authors = [
{ name = "Andrew Svetlov", email = "andrew.svetlov@gmail.com" },
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: System :: Networking",
"Topic :: System :: Distributed Computing",
"Framework :: AsyncIO",
"Development Status :: 4 - Beta",
]

dynamic = ["version"]

dependencies = [
"async-timeout",
"packaging",
]

[optional-dependencies]
snappy = ["cramjam"]
lz4 = ["lz4 >=3.1.3"]
zstd = ["cramjam"]
gssapi = ["gssapi"]
all = ["cramjam", "lz4 >=3.1.3", "gssapi"]

[tool.setuptools.dynamic]
version = { attr = "aiokafka.__version__" }

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
include = [
"aiokafka",
"aiokafka.*",
]

[project.urls]
Documentation = "http://aiokafka.readthedocs.org"
Source = "https://github.com/aio-libs/aiokafka"
Changes = "https://github.com/aio-libs/aiokafka/blob/master/CHANGES.rst"


[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = ["--strict-config", "--strict-markers"]
markers = [
"ssl: Tests that require SSL certificates to run",
]
filterwarnings = [
"error",
# FIXME Until we fix socket leaks in tests
"default:unclosed event loop:ResourceWarning",
]
15 changes: 0 additions & 15 deletions pytest.ini

This file was deleted.

11 changes: 5 additions & 6 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ flake8==4.0.1
black==22.3.0
mypy==0.961
isort[colors]==5.10.0
pytest==7.1.2
pytest-cov==3.0.0
pytest-asyncio==0.18.3
pytest==7.4.3
pytest-cov==4.1.0
pytest-asyncio==0.21.1
pytest-mock==3.12.0
docker==6.1.2
chardet==4.0.0 # Until fixed requests is released
docker==6.1.3
lz4==3.1.3
docutils==0.17.1
Pygments==2.15.0
gssapi==1.8.2
gssapi==1.8.3
async-timeout==4.0.1
cramjam==2.7.0
2 changes: 1 addition & 1 deletion requirements-cython.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Cython==0.29.32
Cython==3.0.5
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
-r requirements-docs.txt

diff-cover==6.4.2
setuptools>=34.4.0
build==1.0.3
9 changes: 4 additions & 5 deletions requirements-win-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ flake8==4.0.1
black==22.3.0
mypy==0.961
isort[colors]==5.10.0
pytest==7.1.2
pytest-cov==3.0.0
pytest-asyncio==0.18.3
pytest==7.4.3
pytest-cov==4.1.0
pytest-asyncio==0.21.1
pytest-mock==3.12.0
docker==6.0.1
chardet==4.0.0 # Until fixed requests is released
docker==6.1.3
lz4==3.1.3
cramjam==2.7.0
Loading
Loading