Skip to content

Commit

Permalink
Bump Python version to 3.11 (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentame authored Feb 22, 2023
2 parents 03fe58c + 0709b06 commit 48254bf
Show file tree
Hide file tree
Showing 5 changed files with 613 additions and 463 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.10"
python-version: "3.11"

- 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.10", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.10", os: ubuntu-latest, session: "safety" }
- { python-version: "3.11", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.11", os: ubuntu-latest, session: "safety" }
# - { 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.7", os: ubuntu-latest, session: "mypy" }
- { 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.7", os: ubuntu-latest, session: "tests" }
- { python-version: "3.10", os: windows-latest, session: "tests" }
- { python-version: "3.10", os: macos-latest, session: "tests" }
# - { python-version: "3.10", os: ubuntu-latest, session: "typeguard" }
- { python-version: "3.10", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.10", os: ubuntu-latest, session: "docs-build" }
- { 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" }

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.10
- name: Set up Python 3.11
uses: actions/[email protected]
with:
python-version: "3.10"
python-version: "3.11"

- name: Upgrade pip
run: |
Expand Down
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


package = "freebox_api"
python_versions = ["3.10", "3.9", "3.8", "3.7"]
python_versions = ["3.11", "3.10", "3.9", "3.8", "3.7"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"pre-commit",
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.10")
@session(name="pre-commit", python="3.11")
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.10")
@session(python="3.11")
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.10")
@session(name="docs-build", python="3.11")
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.10")
@session(python="3.11")
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 48254bf

Please sign in to comment.