Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.6 and support Python 3.10 #511

Merged
merged 7 commits into from
Nov 12, 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 @@ -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
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +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.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: windows-latest, session: "tests" }
- { python-version: "3.10", os: macos-latest, session: "tests" }
- { python-version: "3.10", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.10", os: ubuntu-latest, session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand All @@ -46,12 +46,12 @@ jobs:

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version

- name: Install Nox
run: |
pip install --constraint=.github/workflows/constraints.txt nox
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
nox --version

- name: Install nox-poetry
Expand Down Expand Up @@ -119,12 +119,12 @@ jobs:

- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version

- name: Install Nox
run: |
pip install --constraint=.github/workflows/constraints.txt nox
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
nox --version

- name: Install nox-poetry
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Request features on the `Issue Tracker`_.
How to set up your development environment
------------------------------------------

You need Python 3.6+ and Poetry_.
You need Python 3.7+ and Poetry_.

Install the package with development requirements:

Expand Down Expand Up @@ -103,7 +103,7 @@ Your pull request needs to meet the following guidelines for acceptance:

Feel free to submit early, thoughβ€”we can always iterate on this.

To run linting and code formatting checks before commiting your change, you can install pre-commit as a Git hook by running the following command:
To run linting and code formatting checks before committing your change, you can install pre-commit as a Git hook by running the following command:

.. code:: console

Expand Down
1 change: 1 addition & 0 deletions cutty.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"template": {
"location": "https://github.com/cjolowicz/cookiecutter-hypermodern-python",
"revision": "261d2fd56dc8d3c15255ca00e870c724eebd523f",
"directory": null
},
"bindings": {
Expand Down
13 changes: 6 additions & 7 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"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"pre-commit",
Expand All @@ -34,8 +34,7 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
Args:
session: The Session object.
"""
if session.bin is None:
return
assert session.bin is not None # noqa: S101

virtualenv = session.env.get("VIRTUAL_ENV")
if virtualenv is None:
Expand Down Expand Up @@ -75,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 @@ -97,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 @@ -179,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 @@ -193,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
Loading