Skip to content

Commit

Permalink
Add support for 3.10, 3.11 and 3.12. Ditch 3.7. Use 3.12 in CI by def…
Browse files Browse the repository at this point in the history
…ault.
  • Loading branch information
jerry-git committed Mar 13, 2024
1 parent 4eecc9c commit 4d2122a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"
- run: python -m pip install pre-commit
- run: pre-commit run --all-files

Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"
- run: python -m pip install cookiecutter pytest pyyaml
- run: pytest

Expand All @@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"
- run: python -m pip install cookiecutter poetry
- run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.21
- name: Generate project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
python-version:
required: false
description: 'Python version'
default: '3.10'
default: '3.12'
outputs: {}
runs:
using: 'composite'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"

- name: Install dependencies
run: python -m pip install cruft poetry jello tabulate
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python-poetry-env
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pip install {{ cookiecutter.project_slug }}
* Clone this repository
* Requirements:
* [Poetry](https://python-poetry.org/)
* Python 3.7+
* Python 3.8+
* Create a virtual environment and install the dependencies

```sh
Expand Down
8 changes: 5 additions & 3 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
Expand All @@ -30,7 +32,7 @@ packages = [
]

[tool.poetry.dependencies]
python = ">=3.7.1, <4.0"
python = ">=3.8.1, <4.0"

[tool.poetry.dev-dependencies]
autoflake = "*"
Expand Down Expand Up @@ -65,7 +67,7 @@ profile = "black"
src_paths = ["src", "tests"]

[tool.black]
target-version = ["py37", "py38", "py39"]
target-version = ["py38", "py39", "py310", "py311", "py312"]
include = '\.pyi?$'

[tool.pytest.ini_options]
Expand Down

0 comments on commit 4d2122a

Please sign in to comment.