Skip to content

Commit faefbe1

Browse files
committed
Add support for Python 3.13
Fixes #2051.
1 parent 4fb7246 commit faefbe1

5 files changed

Lines changed: 21 additions & 13 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
9+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1010
exclude:
1111
- python-version: "3.9"
1212
steps:
@@ -19,6 +19,7 @@ jobs:
1919
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
22+
allow-prereleases: true
2223
- name: Install dependencies
2324
run: pip install --upgrade pip wheel tox tox-docker
2425
- name: Run unittest
@@ -31,7 +32,7 @@ jobs:
3132
strategy:
3233
fail-fast: false
3334
matrix:
34-
python-version: [3.8,3.9,"3.10","3.11","3.12"]
35+
python-version: [3.8,3.9,"3.10","3.11","3.12","3.13"]
3536
experimental: [false]
3637
include:
3738
- python-version: pypy3.9
@@ -46,6 +47,10 @@ jobs:
4647
uses: actions/setup-python@v5
4748
with:
4849
python-version: ${{ matrix.python-version }}
50+
allow-prereleases: true
51+
- name: Allow pre-releases on Python 3.13
52+
run: echo "PIP_PRE=1" >> $GITHUB_ENV
53+
if: ${{ python-version == '3.13' }}
4954
- name: Install dependencies
5055
run: pip install --upgrade pip wheel tox tox-docker
5156
# Tox fails if a Python versions contains a hyphen, this changes "pypy-3.9" to "pypy3.9".
@@ -76,6 +81,7 @@ jobs:
7681
uses: actions/setup-python@v5
7782
with:
7883
python-version: ${{ matrix.python-version }}
84+
allow-prereleases: true
7985
- name: Install dependencies
8086
run: pip install --upgrade pip wheel tox tox-docker
8187
- name: Run flake8

kombu/transport/redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090

9191
logger = get_logger('kombu.transport.redis')
92-
crit, warn = logger.critical, logger.warn
92+
crit, warn = logger.critical, logger.warning
9393

9494
DEFAULT_PORT = 6379
9595
DEFAULT_DB = 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
confluent-kafka>=2.2.0
1+
confluent-kafka>=2.2.0 ; python_version < "3.13"

requirements/extras/zstd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
zstandard
1+
zstandard ; python_version < "3.13"

tox.ini

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tox]
22
envlist =
3-
{pypy3.9,3.8,3.9,3.10,3.11,3.12}-unit
4-
{pypy3.9,3.8,3.9,3.10,3.11,3.12}-linux-integration-py-amqp
3+
{pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13}-unit
4+
{pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-py-amqp
55
{pypy3.9,3.8,3.9,3.10,3.11}-linux-integration-redis
66
{pypy3.9,3.8,3.9,3.10,3.11}-linux-integration-mongodb
7-
{3.8,3.9,3.10,3.11,3.12}-linux-integration-kafka
7+
{3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-kafka
88
flake8
99
apicheck
1010
pydocstyle
@@ -20,6 +20,7 @@ python =
2020
3.10: py310, mypy
2121
3.11: py311
2222
3.12: py312
23+
3.13: py313
2324

2425
[testenv]
2526
sitepackages = False
@@ -28,10 +29,10 @@ passenv =
2829
DISTUTILS_USE_SDK
2930
deps=
3031
-r{toxinidir}/requirements/dev.txt
31-
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt
32-
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt
33-
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test-ci.txt
34-
apicheck,3.8-linux,3.9-linux,3.10-linux,3.11-linux,3.12-linux: -r{toxinidir}/requirements/extras/confluentkafka.txt
32+
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/default.txt
33+
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/test.txt
34+
apicheck,pypy3.9,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/test-ci.txt
35+
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
3536
apicheck,linkcheck: -r{toxinidir}/requirements/docs.txt
3637
flake8,pydocstyle,mypy: -r{toxinidir}/requirements/pkgutils.txt
3738

@@ -50,6 +51,7 @@ basepython =
5051
3.10,apicheck,pydocstyle,flake8,linkcheck,cov,mypy: python3.10
5152
3.11: python3.11
5253
3.12: python3.12
54+
3.13: python3.13
5355

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

@@ -135,4 +137,4 @@ commands =
135137
pydocstyle {toxinidir}/kombu
136138

137139
[testenv:mypy]
138-
commands = python -m mypy --config-file setup.cfg
140+
commands = python -m mypy --config-file setup.cfg

0 commit comments

Comments
 (0)