Skip to content

Commit

Permalink
Use Python 3.12 as main CI version
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentame authored Aug 12, 2024
1 parent 2beb469 commit 745c6c0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,23 @@ jobs:
fail-fast: false
matrix:
include:
- { python-version: "3.11", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.11", os: ubuntu-latest, session: "safety" }
- { python-version: "3.12", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.12", os: ubuntu-latest, session: "safety" }
- { 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.8", os: ubuntu-latest, session: "mypy" }
- { 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.8", os: ubuntu-latest, session: "tests" }
- { python-version: "3.11", os: windows-latest, session: "tests" }
- { python-version: "3.11", os: macos-latest, session: "tests" }
- { python-version: "3.11", os: ubuntu-latest, session: "typeguard" }
- { python-version: "3.11", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.11", os: ubuntu-latest, session: "docs-build" }
- { 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" }

env:
NOXSESSION: ${{ matrix.session }}
Expand Down Expand Up @@ -105,10 +107,10 @@ jobs:
- name: Check out the repository
uses: actions/[email protected]

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: "3.11"
python-version: "3.12"

- 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 @@ -9,4 +9,4 @@ python:
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"
12 changes: 6 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@


package = "freebox_api"
python_versions = ["3.11", "3.10", "3.9", "3.8"]
nox.needs_version = ">= 2021.6.6"
python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"]
nox.needs_version = ">= 2023.4.22"
nox.options.sessions = (
"pre-commit",
"safety",
Expand Down Expand Up @@ -84,7 +84,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.12")
def precommit(session: Session) -> None:
"""Lint using pre-commit."""
args = session.posargs or ["run", "--all-files", "--show-diff-on-failure"]
Expand All @@ -106,7 +106,7 @@ def precommit(session: Session) -> None:
activate_virtualenv_in_precommit_hooks(session)


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


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


@session(python="3.11")
@session(python="3.12")
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
Expand Down

0 comments on commit 745c6c0

Please sign in to comment.