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 #594

Merged
merged 2 commits into from
Oct 30, 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/codeql_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: ${{ matrix.language == 'python' }}
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Build Application using script
if: ${{ matrix.language == 'python' }}
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand All @@ -40,8 +40,8 @@ jobs:
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
run: |
tox -e typing-pytype -p all
- name: Run tox (Style, Type checker, Security, Docs) | Python 3.12
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
- name: Run tox (Style, Type checker, Security, Docs) | Python 3.13
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.13' }}
run: |
tox -e style,typing-mypy,typing-pyright,security-bandit,docs -p all
- name: Run tox (Tests) | ${{ matrix.platform }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
run: |
py.test
- name: Upload coverage JUint report
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.13' }}
uses: actions/upload-artifact@v4
with:
name: test-n-coverage-report
Expand All @@ -60,7 +60,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Download a coverage artifact
uses: actions/download-artifact@v4
Expand All @@ -83,7 +83,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
- macos-13 # intel
- macos-latest # apple silicon
- windows-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.12"]
python-version: ["3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
matrix:
platform:
- ubuntu-latest
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout source at ${{ matrix.platform }}
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ exclude: '.git|.tox|.venv|.vscode|__pycache__|.pytest_cache|.eggs|.mypy_cache|.p
default_stages: [pre-commit]
fail_fast: true
default_language_version:
python: python3.12
python: python3.13
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
Expand All @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.7.1
hooks:
- id: ruff
- id: ruff-format
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: '3.12'
python: 'latest'
python:
install:
- requirements: requirements/docs.txt
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.it
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine AS builder
FROM python:3.13-alpine AS builder

RUN apk add --no-cache --update --virtual .build-deps \
build-base \
Expand All @@ -18,7 +18,7 @@ RUN pip install pip setuptools wheel --upgrade \
&& pip wheel --wheel-dir=/svc/wheels -r tests.txt \
&& pip install poetry-core>=1.0.0

FROM python:3.12-alpine
FROM python:3.13-alpine

ENV PYTHONUNBUFFERED=1 \
DEBUG=0 \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine AS builder
FROM python:3.13-alpine AS builder

RUN apk add --no-cache --update --virtual .build-deps \
build-base \
Expand Down Expand Up @@ -31,7 +31,7 @@ RUN pip install pip wheel --upgrade \
&& python setup.py bdist_wheel --dist-dir /svc/dist \
|| pip wheel --wheel-dir=/svc/wheels -e ${PROJECT_PATH}

FROM python:3.12-alpine
FROM python:3.13-alpine

ENV PYTHONUNBUFFERED=1 \
DEBUG=0 \
Expand Down
39 changes: 39 additions & 0 deletions Dockerfile.py313.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM python:3.13-alpine

ENV PYTHONUNBUFFERED=1 \
PRAGMA_VERSION=py3.13 \
DEBUG=0

WORKDIR /code

COPY requirements/ /code/requirements/

RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
python3-dev \
git \
&& pip install pip setuptools wheel --upgrade \
&& pip install -r requirements/base.txt \
&& pip install -r requirements/style.txt \
&& pip install -r requirements/tests.txt \
poetry-core>=1.0.0 \
&& apk del .build-deps \
&& addgroup -S kuchulu \
&& adduser \
--disabled-password \
--gecos "" \
--ingroup kuchulu \
--no-create-home \
-s /bin/false \
kuchulu

ARG VERSION=1
RUN echo "Vesion: ${VERSION}"

COPY . /code/

RUN chown kuchulu:kuchulu -R /code

USER kuchulu
8 changes: 8 additions & 0 deletions bin/docker-compose-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,17 @@ DOCKER_WAIT_FOR_PY311=$?
)
DOCKER_WAIT_FOR_PY312=$?

(
set -e
docker wait ci-python3.13-1
docker logs ci-python3.13-1
)
DOCKER_WAIT_FOR_PY313=$?

docker compose -f ${DOCKER_COMPOSE_FILE_PATH} -p ci down --remove-orphans

if [ ${DOCKER_WAIT_FOR_PY39} -ne 0 ]; then echo "Test to Python 3.9 failed"; exit 1; fi
if [ ${DOCKER_WAIT_FOR_PY310} -ne 0 ]; then echo "Test to Python 3.10 failed"; exit 1; fi
if [ ${DOCKER_WAIT_FOR_PY311} -ne 0 ]; then echo "Test to Python 3.11 failed"; exit 1; fi
if [ ${DOCKER_WAIT_FOR_PY312} -ne 0 ]; then echo "Test to Python 3.12 failed"; exit 1; fi
if [ ${DOCKER_WAIT_FOR_PY313} -ne 0 ]; then echo "Test to Python 3.13 failed"; exit 1; fi
10 changes: 10 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
services:
python3.13:
build:
context: .
dockerfile: Dockerfile.py313.test
environment:
- PRAGMA_VERSION=py3.13
command: >
sh -c "ruff check . &&
pytest"

python3.12:
build:
context: .
Expand Down
6 changes: 3 additions & 3 deletions examples/javascript/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
py3{13,12,11,10,9,8}
py3{13,12,11,10,9,8}-async
skip_missing_interpreters = true

[testenv]
Expand All @@ -10,7 +10,7 @@ wheel_build_env = .pkg
envtmpdir = {toxworkdir}/tmp/{envname}
constrain_package_deps = true
use_frozen_constraints = true
deps =
deps =
pytest==8.3.3
pytest-cov==5.0.0
pytest-xdist==3.6.1
Expand Down
6 changes: 3 additions & 3 deletions examples/minimal-async/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
py3{13,12,11,10,9,8}
py3{13,12,11,10,9,8}-async
skip_missing_interpreters = true

[testenv]
Expand All @@ -10,7 +10,7 @@ wheel_build_env = .pkg
envtmpdir = {toxworkdir}/tmp/{envname}
constrain_package_deps = true
use_frozen_constraints = true
deps =
deps =
pytest==8.3.3
pytest-cov==5.0.0
pytest-xdist==3.6.1
Expand Down
6 changes: 3 additions & 3 deletions examples/minimal/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
py3{13,12,11,10,9,8}
py3{13,12,11,10,9,8}-async
skip_missing_interpreters = true

[testenv]
Expand All @@ -10,7 +10,7 @@ wheel_build_env = .pkg
envtmpdir = {toxworkdir}/tmp/{envname}
constrain_package_deps = true
use_frozen_constraints = true
deps =
deps =
pytest==8.3.3
pytest-cov==5.0.0
pytest-xdist==3.6.1
Expand Down
6 changes: 3 additions & 3 deletions examples/modular/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
py3{13,12,11,10,9,8}
py3{13,12,11,10,9,8}-async
skip_missing_interpreters = true

[testenv]
Expand All @@ -10,7 +10,7 @@ wheel_build_env = .pkg
envtmpdir = {toxworkdir}/tmp/{envname}
constrain_package_deps = true
use_frozen_constraints = true
deps =
deps =
pytest==8.3.3
pytest-cov==5.0.0
pytest-xdist==3.6.1
Expand Down
6 changes: 3 additions & 3 deletions examples/multiplesite/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
py3{13,12,11,10,9,8}
py3{13,12,11,10,9,8}-async
skip_missing_interpreters = true

[testenv]
Expand All @@ -10,7 +10,7 @@ wheel_build_env = .pkg
envtmpdir = {toxworkdir}/tmp/{envname}
constrain_package_deps = true
use_frozen_constraints = true
deps =
deps =
pytest==8.3.3
pytest-cov==5.0.0
pytest-xdist==3.6.1
Expand Down
6 changes: 3 additions & 3 deletions examples/openrpc/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
py3{13,12,11,10,9,8}
py3{13,12,11,10,9,8}-async
skip_missing_interpreters = true

[testenv]
Expand All @@ -10,7 +10,7 @@ wheel_build_env = .pkg
envtmpdir = {toxworkdir}/tmp/{envname}
constrain_package_deps = true
use_frozen_constraints = true
deps =
deps =
pytest==8.3.3
pytest-cov==5.0.0
pytest-xdist==3.6.1
Expand Down
Loading