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

Add support for Python 3.13 #2052

Merged
merged 1 commit into from
Oct 23, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: blacksmith-4vcpu-ubuntu-2204
strategy:
matrix:
python-version: ["3.12"]
python-version: ["3.13"]
Nusnus marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Install system packages
run: sudo apt-get update && sudo apt-get install libssl-dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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']
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
Expand Down Expand Up @@ -74,7 +74,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']
toxenv: [
'py-amqp',
'py-redis',
Expand Down
15 changes: 10 additions & 5 deletions t/unit/transport/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,11 +1326,16 @@ def pipeline(transaction=True, shard_hint=None):

channel.qos.restore_by_tag('test-tag')
assert mock_execute_command is not None
assert mock_execute_command.mock_calls == [
call('WATCH', 'foo_unacked'),
call('HGET', 'foo_unacked', 'test-tag'),
call('ZREM', 'foo_unacked_index', 'test-tag'),
call('HDEL', 'foo_unacked', 'test-tag')
# https://github.com/redis/redis-py/pull/3038 (redis>=5.1.0a1)
# adds keyword argument `keys` to redis client.
# To be compatible with all supported redis versions,
# take into account only `call.args`.
call_args = [call.args for call in mock_execute_command.mock_calls]
assert call_args == [
('WATCH', 'foo_unacked'),
('HGET', 'foo_unacked', 'test-tag'),
('ZREM', 'foo_unacked_index', 'test-tag'),
('HDEL', 'foo_unacked', 'test-tag')
]


Expand Down
32 changes: 17 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
{pypy3.10,3.8,3.9,3.10,3.11,3.12}-unit
{pypy3.10,3.8,3.9,3.10,3.11,3.12}-linux-integration-py-amqp
{pypy3.10,3.8,3.9,3.10,3.11,3.12}-linux-integration-redis
{pypy3.10,3.8,3.9,3.10,3.11,3.12}-linux-integration-mongodb
{pypy3.10,3.8,3.9,3.10,3.11,3.12}-linux-integration-kafka
{pypy3.10,3.8,3.9,3.10,3.11,3.12,3.13}-unit
{pypy3.10,3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-py-amqp
{pypy3.10,3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-redis
{pypy3.10,3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-mongodb
{pypy3.10,3.8,3.9,3.10,3.11,3.12,3.13}-linux-integration-kafka
flake8
apicheck
pydocstyle
Expand All @@ -21,6 +21,7 @@ python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313
pypy3: pypy3

[testenv]
Expand All @@ -32,10 +33,10 @@ passenv =
DISTUTILS_USE_SDK
deps=
-r{toxinidir}/requirements/dev.txt
apicheck,pypy3.10,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/default.txt
apicheck,pypy3.10,3.8,3.9,3.10,3.11,3.12: -r{toxinidir}/requirements/test.txt
apicheck,pypy3.10,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.10,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/default.txt
apicheck,pypy3.10,3.8,3.9,3.10,3.11,3.12,3.13: -r{toxinidir}/requirements/test.txt
apicheck,pypy3.10,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
integration: -r{toxinidir}/requirements/test-integration.txt
Expand All @@ -54,7 +55,8 @@ basepython =
3.10: python3.10
3.11: python3.11
3.12: python3.12
apicheck,pydocstyle,flake8,linkcheck,cov,mypy: python3.12
3.13: python3.13
apicheck,pydocstyle,flake8,linkcheck,cov,mypy: python3.13

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

Expand Down Expand Up @@ -162,9 +164,9 @@ setenv =
PYTHONDONTWRITEBYTECODE = 1
commands =
tox -e \
3.12-unit,\
3.12-linux-integration-py-amqp,\
3.12-linux-integration-redis,\
3.12-linux-integration-mongodb,\
3.12-linux-integration-kafka \
3.13-unit,\
3.13-linux-integration-py-amqp,\
3.13-linux-integration-redis,\
3.13-linux-integration-mongodb,\
3.13-linux-integration-kafka \
-p -o -- --exitfirst {posargs}