Skip to content

Commit

Permalink
Add support for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
rominf committed Jul 5, 2024
1 parent 4fb7246 commit faefbe1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
exclude:
- python-version: "3.9"
steps:
Expand All @@ -19,6 +19,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: pip install --upgrade pip wheel tox tox-docker
- name: Run unittest
Expand All @@ -31,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8,3.9,"3.10","3.11","3.12"]
python-version: [3.8,3.9,"3.10","3.11","3.12","3.13"]
experimental: [false]
include:
- python-version: pypy3.9
Expand All @@ -46,6 +47,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Allow pre-releases on Python 3.13
run: echo "PIP_PRE=1" >> $GITHUB_ENV
if: ${{ python-version == '3.13' }}
- name: Install dependencies
run: pip install --upgrade pip wheel tox tox-docker
# Tox fails if a Python versions contains a hyphen, this changes "pypy-3.9" to "pypy3.9".
Expand Down Expand Up @@ -76,6 +81,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: pip install --upgrade pip wheel tox tox-docker
- name: Run flake8
Expand Down
2 changes: 1 addition & 1 deletion kombu/transport/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@


logger = get_logger('kombu.transport.redis')
crit, warn = logger.critical, logger.warn
crit, warn = logger.critical, logger.warning

DEFAULT_PORT = 6379
DEFAULT_DB = 0
Expand Down
2 changes: 1 addition & 1 deletion requirements/extras/confluentkafka.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
confluent-kafka>=2.2.0
confluent-kafka>=2.2.0 ; python_version < "3.13"
2 changes: 1 addition & 1 deletion requirements/extras/zstd.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zstandard
zstandard ; python_version < "3.13"
18 changes: 10 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
{pypy3.9,3.8,3.9,3.10,3.11,3.12}-unit
{pypy3.9,3.8,3.9,3.10,3.11,3.12}-linux-integration-py-amqp
{pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13}-unit
{pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-py-amqp
{pypy3.9,3.8,3.9,3.10,3.11}-linux-integration-redis
{pypy3.9,3.8,3.9,3.10,3.11}-linux-integration-mongodb
{3.8,3.9,3.10,3.11,3.12}-linux-integration-kafka
{3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-kafka
flake8
apicheck
pydocstyle
Expand All @@ -20,6 +20,7 @@ python =
3.10: py310, mypy
3.11: py311
3.12: py312
3.13: py313

[testenv]
sitepackages = False
Expand All @@ -28,10 +29,10 @@ passenv =
DISTUTILS_USE_SDK
deps=
-r{toxinidir}/requirements/dev.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test-ci.txt
apicheck,3.8-linux,3.9-linux,3.10-linux,3.11-linux,3.12-linux: -r{toxinidir}/requirements/extras/confluentkafka.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/default.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/test.txt
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/test-ci.txt
apicheck,3.8-linux,3.9-linux,3.10-linux,3.11-linux,3.12-linux,3.13-linux: -r{toxinidir}/requirements/extras/confluentkafka.txt
apicheck,linkcheck: -r{toxinidir}/requirements/docs.txt
flake8,pydocstyle,mypy: -r{toxinidir}/requirements/pkgutils.txt

Expand All @@ -50,6 +51,7 @@ basepython =
3.10,apicheck,pydocstyle,flake8,linkcheck,cov,mypy: python3.10
3.11: python3.11
3.12: python3.12
3.13: python3.13

install_command = python -m pip --disable-pip-version-check install {opts} {packages}

Expand Down Expand Up @@ -135,4 +137,4 @@ commands =
pydocstyle {toxinidir}/kombu

[testenv:mypy]
commands = python -m mypy --config-file setup.cfg
commands = python -m mypy --config-file setup.cfg

0 comments on commit faefbe1

Please sign in to comment.