Skip to content

Commit feec1d0

Browse files
committedFeb 19, 2025·
Set default python version to 3.11 and add support for python 3.13
- Python 3.10 is still supported, but depricated.
1 parent e6e3de6 commit feec1d0

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed
 

‎{{cookiecutter.project_name}}/.github/workflows/tests.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- { python: "3.10", os: "ubuntu-latest", session: "pre-commit" }
19-
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
18+
- { python: "3.11", os: "ubuntu-latest", session: "pre-commit" }
2019
- { python: "3.11", os: "ubuntu-latest", session: "mypy" }
2120
- { python: "3.12", os: "ubuntu-latest", session: "mypy" }
21+
- { python: "3.13", os: "ubuntu-latest", session: "mypy" }
2222
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
2323
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
2424
- { python: "3.12", os: "ubuntu-latest", session: "tests" }
25-
- { python: "3.12", os: "windows-latest", session: "tests" }
26-
- { python: "3.12", os: "macos-latest", session: "tests" }
27-
- { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
28-
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
29-
- { python: "3.10", os: "ubuntu-latest", session: "docs-build" }
25+
- { python: "3.13", os: "ubuntu-latest", session: "tests" }
26+
- { python: "3.13", os: "windows-latest", session: "tests" }
27+
- { python: "3.13", os: "macos-latest", session: "tests" }
28+
- { python: "3.11", os: "ubuntu-latest", session: "typeguard" }
29+
- { python: "3.11", os: "ubuntu-latest", session: "xdoctest" }
30+
- { python: "3.11", os: "ubuntu-latest", session: "docs-build" }
3031

3132
env:
3233
NOXSESSION: ${{"{{"}} matrix.session {{"}}"}}
@@ -127,7 +128,7 @@ jobs:
127128
- name: Set up Python
128129
uses: actions/setup-python@v5.4.0
129130
with:
130-
python-version: "3.10"
131+
python-version: "3.11"
131132
{% raw %}
132133
- name: Upgrade pip
133134
run: |

‎{{cookiecutter.project_name}}/noxfile.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
raise SystemExit(dedent(message)) from None
2424

2525
package = "{{cookiecutter.package_name}}"
26-
python_versions = ["3.10", "3.11", "3.12"]
26+
python_versions = ["3.11", "3.12", "3.13"]
27+
python_versions_for_test = python_versions + ["3.10"]
2728
nox.needs_version = ">= 2021.6.6"
2829
nox.options.sessions = (
2930
"pre-commit",
@@ -150,7 +151,7 @@ def mypy(session: Session) -> None:
150151
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")
151152

152153

153-
@session(python=python_versions)
154+
@session(python=python_versions_for_test)
154155
def tests(session: Session) -> None:
155156
"""Run the test suite."""
156157
session.install(".")

‎{{cookiecutter.project_name}}/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ show_error_context = true
7575
force-exclude = true # Apply excludes to pre-commit
7676
show-fixes = true
7777
src = ["src", "tests"]
78-
target-version = "py310" # Minimum Python version supported
78+
target-version = "py311" # Minimum Python version supported
7979
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
8080
extend-exclude = [
8181
"__pycache__",

‎{{cookiecutter.project_name}}/sonar-project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sonar.host.url=https://sonarcloud.io
55
sonar.sources=src/{{cookiecutter.package_name}}/
66
sonar.tests=tests/
77

8-
sonar.python.version=3.10
8+
sonar.python.version=3.11
99
sonar.python.coverage.reportPaths=coverage.xml
1010

1111
sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)
Please sign in to comment.