Skip to content

Commit

Permalink
Add Python 3.13 to CI (#1418)
Browse files Browse the repository at this point in the history
* Update default Python version to 3.13

* Adjust

* Bump cffi

* Bump nodeenv

* Bump typing-extensions
  • Loading branch information
epenet authored Jan 6, 2025
1 parent c46043e commit cedc1eb
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Upgrade pip
run: |
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ jobs:
fail-fast: false
matrix:
include:
- { python-version: "3.11", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.12", os: ubuntu-latest, session: "safety" }
- { python-version: "3.13", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.13", os: ubuntu-latest, session: "safety" }
- { python-version: "3.13", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.12", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.11", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.10", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.9", os: ubuntu-latest, session: "mypy" }
- { python-version: "3.13", os: ubuntu-latest, session: "tests" }
- { python-version: "3.12", os: ubuntu-latest, session: "tests" }
- { python-version: "3.11", os: ubuntu-latest, session: "tests" }
- { python-version: "3.10", os: ubuntu-latest, session: "tests" }
- { python-version: "3.9", os: ubuntu-latest, session: "tests" }
- { python-version: "3.12", os: windows-latest, session: "tests" }
- { python-version: "3.12", os: macos-latest, session: "tests" }
- { python-version: "3.12", os: ubuntu-latest, session: "typeguard" }
- { python-version: "3.12", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.12", os: ubuntu-latest, session: "docs-build" }
- { python-version: "3.13", os: windows-latest, session: "tests" }
- { python-version: "3.13", os: macos-latest, session: "tests" }
- { python-version: "3.13", os: ubuntu-latest, session: "typeguard" }
- { python-version: "3.13", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.13", os: ubuntu-latest, session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand Down Expand Up @@ -114,7 +116,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Upgrade pip
run: |
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
python: "3.13"

sphinx:
configuration: docs/conf.py
Expand Down
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


package = "renault_api"
python_versions = ["3.12", "3.11", "3.10", "3.9"]
python_versions = ["3.13", "3.12", "3.11", "3.10", "3.9"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"pre-commit",
Expand Down Expand Up @@ -82,7 +82,7 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
hook.write_text("\n".join(lines))


@session(name="pre-commit", python="3.11")
@session(name="pre-commit", python="3.13")
def precommit(session: Session) -> None:
"""Lint using pre-commit."""
args = session.posargs or ["run", "--all-files", "--show-diff-on-failure"]
Expand All @@ -97,7 +97,7 @@ def precommit(session: Session) -> None:
activate_virtualenv_in_precommit_hooks(session)


@session(python="3.12")
@session(python="3.13")
def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
requirements = session.poetry.export_requirements()
Expand Down Expand Up @@ -180,7 +180,7 @@ def xdoctest(session: Session) -> None:
session.run("python", "-m", "xdoctest", package, *args)


@session(name="docs-build", python="3.12")
@session(name="docs-build", python="3.13")
def docs_build(session: Session) -> None:
"""Build the documentation."""
args = session.posargs or ["docs", "docs/_build"]
Expand All @@ -194,7 +194,7 @@ def docs_build(session: Session) -> None:
session.run("sphinx-build", *args)


@session(python="3.12")
@session(python="3.13")
def docs(session: Session) -> None:
"""Build and serve the documentation with live reloading on file changes."""
args = session.posargs or ["--open-browser", "docs", "docs/_build"]
Expand Down
Loading

0 comments on commit cedc1eb

Please sign in to comment.