Skip to content

Commit

Permalink
Support Python 3.10
Browse files Browse the repository at this point in the history
* πŸ‘· [nox] Support Python 3.10

* πŸ‘· [github] Use Python 3.10 in Tests workflow

* πŸ‘· [github] Use Python 3.10 in Release workflow

* πŸ“¦ [poetry] Add Trove classifier for Python 3.10

* πŸ“š Document Python 3.10 support

Cutty-Original-PR: cjolowicz/cookiecutter-hypermodern-python#1052
  • Loading branch information
cjolowicz committed Nov 12, 2021
1 parent 99fe81a commit 7566f3f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 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/setup-python@v2.2.2
with:
python-version: "3.9"
python-version: "3.10"

- name: Upgrade pip
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ 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.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.6, 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.6, 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: "xdoctest" }
- { python-version: 3.9, os: ubuntu-latest, session: "docs-build" }
- { python-version: "3.10", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.10", os: ubuntu-latest, session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand Down
2 changes: 1 addition & 1 deletion cutty.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"template": {
"location": "https://github.com/cjolowicz/cookiecutter-hypermodern-python",
"revision": "d15b6e6302c004d7ef1b2c39f604ef47caefefc0",
"revision": "649ca5faf4a0d43552b712b1da0d1f6705d8fed0",
"directory": null
},
"bindings": {
Expand Down
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


package = "nox_poetry"
python_versions = ["3.9", "3.8", "3.7", "3.6"]
python_versions = ["3.10", "3.9", "3.8", "3.7", "3.6"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"pre-commit",
Expand Down Expand Up @@ -74,7 +74,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 @@ -96,7 +96,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 @@ -178,7 +178,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 @@ -192,7 +192,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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]

[tool.poetry.urls]
Expand Down

0 comments on commit 7566f3f

Please sign in to comment.