Skip to content

Commit

Permalink
Merge pull request #35 from espressif/feat/python3-13_support
Browse files Browse the repository at this point in the history
Add Python 3.13 support
  • Loading branch information
dobairoland authored Nov 6, 2024
2 parents ef69a95 + 15a7457 commit d376e5f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 16 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build-wheels-defined.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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']
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -88,7 +88,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']
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -124,7 +124,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']
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -163,7 +163,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']
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -212,7 +212,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']
include:
- python-version: '3.8'
CONTAINER: 'python:3.8-bullseye'
Expand All @@ -224,6 +224,8 @@ jobs:
CONTAINER: 'python:3.11-bullseye'
- python-version: '3.12'
CONTAINER: 'python:3.12-bullseye'
- python-version: '3.13'
CONTAINER: 'python:3.13-bullseye'
container: ${{ matrix.CONTAINER }}
steps:
- name: Checkout repository
Expand Down Expand Up @@ -261,7 +263,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']
include:
- python-version: '3.8'
CONTAINER: 'python:3.8-bullseye'
Expand All @@ -273,6 +275,8 @@ jobs:
CONTAINER: 'python:3.11-bullseye'
- python-version: '3.12'
CONTAINER: 'python:3.12-bullseye'
- python-version: '3.13'
CONTAINER: 'python:3.13-bullseye'
container: ${{ matrix.CONTAINER }}
steps:
- name: Checkout repository
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/build-wheels-python-dependent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
include:
- os: linux-armv7-self-hosted
python-version: '3.9'
Expand All @@ -35,6 +36,9 @@ jobs:
- os: linux-armv7-self-hosted
python-version: '3.12'
CONTAINER: 'python:3.12-bullseye'
- os: linux-armv7-self-hosted
python-version: '3.13'
CONTAINER: 'python:3.13-bullseye'

- os: linux-arm64-self-hosted
python-version: '3.9'
Expand All @@ -48,6 +52,9 @@ jobs:
- os: linux-arm64-self-hosted
python-version: '3.12'
CONTAINER: 'python:3.12-bullseye'
- os: linux-arm64-self-hosted
python-version: '3.13'
CONTAINER: 'python:3.13-bullseye'


# Use python container on ARM
Expand Down Expand Up @@ -93,12 +100,20 @@ jobs:
name: dependent_requirements_${{ matrix.os}}
path: dependent_requirements_${{ matrix.os}}

- name: Print requirements
if: matrix.os != 'windows-latest'
run: cat dependent_requirements_${{ matrix.os}}/dependent_requirements.txt

- name: Print requirements - Windows
if: matrix.os == 'windows-latest'
run: type dependent_requirements_${{ matrix.os}}\\dependent_requirements.txt

- name: Build Python dependent wheels for ${{ matrix.python-version }}
if: matrix.os != 'windows-latest'
run: |
# Rust directory needs to be included for Linux ARM7
if [ "${{ matrix.os }}" = "linux-armv7-self-hosted" ]; then
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
. $HOME/.cargo/env
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
prerelease: false
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default_install_hook_types: [pre-commit,commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -18,24 +18,24 @@ repos:

# Replaces flake8
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.0
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.10.0
rev: v3.13.0
hooks:
- id: reorder-python-imports

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: ['types-all']
additional_dependencies: ['types-all-latest']

- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.2.1
rev: v1.10.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Supported Python versions:
* 3.10
* 3.11
* 3.12
* 3.13

For each `release` branch of [ESP-IDF] starting from the version defined in GitHub variables and [ESP-IDF] `master` branch all the requirements and constraints files are automatically downloaded and wheels are built and uploaded.

Expand Down
22 changes: 19 additions & 3 deletions exclude_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
- package_name: 'gdbgui'
version: '==0.13.2.0'

# cffi==1.17.0 does not exist yet it is required by some wheel (7/11/2024)
- package_name: 'cffi'
version: '==1.17.0'
# Python 13.3 does not support Pillow 9.5.0
- package_name: 'Pillow'
version: '==9.5.0'
python: '==3.13'

# gdbgui leads to installation of greenlet which does not support Python 3.13 yet
# issue: https://github.com/cs01/gdbgui/issues/494
- package_name: 'gdbgui'
python: '==3.13'
# some versions of greenlet are not supported by Python 3.13
- package_name: 'greenlet'
version: '<3.0'
python: '==3.13'

# Python 3.13 does not support windows_curses on Windows
# issue: https://github.com/zephyrproject-rtos/windows-curses/issues/69
- package_name: 'windows_curses'
platform: 'win32'
python: '==3.13'

0 comments on commit d376e5f

Please sign in to comment.