Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Add support to Python 3.10 #403

Merged
merged 3 commits into from
Nov 17, 2021
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/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@v2.2.2
with:
python-version: "3.8"
python-version: "3.10"

- name: Upgrade pip
run: |
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ jobs:
fail-fast: false
matrix:
include:
- { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
- { python-version: 3.9, os: ubuntu-latest, session: "safety" }
- { 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.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.9, os: windows-latest, session: "tests" }
- { python-version: 3.9, os: macos-latest, session: "tests" }
# - { python-version: 3.9, os: ubuntu-latest, session: "typeguard" }
- { python-version: 3.9, os: ubuntu-latest, session: "docs-build" }
- { python-version: "3.10", os: "ubuntu-latest", session: "pre-commit" }
- { python-version: "3.10", os: "ubuntu-latest", session: "safety" }
- { 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.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: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand Down Expand Up @@ -102,10 +104,10 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v2.4.0

- name: Set up Python 3.9
- name: Set up Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.9
python-version: "3.10"

- 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 @@ -18,7 +18,7 @@


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


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


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


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


@session(python="3.9")
@session(python="3.10")
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