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

feat: add support for Python 3.13 and drop 3.8 #24

Merged
merged 1 commit into from
Nov 11, 2024
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/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,40 @@ You can check at any time the environments and scripts that are prepared to supp

```plain
$ hatch env show --ascii
Standalone
+---------+---------+------------------+----------------------+------------------------------+
| Name | Type | Dependencies | Scripts | Description |
+=========+=========+==================+======================+==============================+
| default | virtual | coverage[toml] | check | Base development environment |
| | | pre-commit | format | |
| | | pytest | lint | |
| | | pytest-cov | pre-commit-install | |
| | | | pre-commit-uninstall | |
| | | | qa | |
| | | | test | |
| | | | test-no-cov | |
| | | | type | |
+---------+---------+------------------+----------------------+------------------------------+
| docs | virtual | docutils | build | Documentation environment |
| | | jupyter-book | config | |
| | | sphinx-autobuild | serve | |
+---------+---------+------------------+----------------------+------------------------------+
Standalone
+---------+---------+-----------------------------+----------------------+------------------------------+
| Name | Type | Dependencies | Scripts | Description |
+=========+=========+=============================+======================+==============================+
| default | virtual | coverage[toml]>=7.5.3 | check | Base development environment |
| | | pre-commit>=3.5.0 | format | |
| | | pytest-cov>=5.0.0 | lint | |
| | | pytest>=8.2.2 | pre-commit-install | |
| | | | pre-commit-uninstall | |
| | | | qa | |
| | | | test | |
| | | | test-no-cov | |
| | | | type | |
+---------+---------+-----------------------------+----------------------+------------------------------+
| docs | virtual | docutils==0.20.1 | build | Documentation environment |
| | | jupyter-book==1.0.0 | config | |
| | | sphinx-autobuild==2024.4.16 | serve | |
| | | sphinx==7.3.7 | | |
+---------+---------+-----------------------------+----------------------+------------------------------+
Matrices
+------+---------+-------------+----------------------+----------------------+---------------------------+
| Name | Type | Envs | Dependencies | Scripts | Description |
+======+=========+=============+======================+======================+===========================+
| test | virtual | test.py3.8 | coverage[toml] | check | Extended test environment |
| | | test.py3.9 | pre-commit | extended | |
| | | test.py3.10 | pytest | format | |
| | | test.py3.11 | pytest-cov | lint | |
| | | test.py3.12 | pytest-randomly | pre-commit-install | |
| | | | pytest-rerunfailures | pre-commit-uninstall | |
| | | | pytest-xdist | qa | |
| | | | | test | |
| | | | | test-no-cov | |
| | | | | type | |
+------+---------+-------------+----------------------+----------------------+---------------------------+
+------+---------+-------------+-----------------------+----------------------+---------------------------+
| Name | Type | Envs | Dependencies | Scripts | Description |
+======+=========+=============+=======================+======================+===========================+
| test | virtual | test.py3.9 | coverage[toml]>=7.5.3 | check | Extended test environment |
| | | test.py3.10 | pre-commit>=3.5.0 | extended | |
| | | test.py3.11 | pytest-cov>=5.0.0 | format | |
| | | test.py3.12 | pytest-randomly | lint | |
| | | test.py3.13 | pytest-rerunfailures | pre-commit-install | |
| | | | pytest-xdist | pre-commit-uninstall | |
| | | | pytest>=8.2.2 | qa | |
| | | | | test | |
| | | | | test-no-cov | |
| | | | | type | |
+------+---------+-------------+-----------------------+----------------------+---------------------------+
```

## Quick Start
Expand Down Expand Up @@ -152,7 +153,7 @@ $ hatch env show --ascii

### Dependencies

1. The template is designed to work with Python 3.8 and later versions. It is recommended to use the latest stable version of Python.
1. The template is designed to work with Python 3.9 and later versions. It is recommended to use the latest stable version of Python.

1. Project dependencies are managed on the file [pyproject.toml](pyproject.toml), refer to
[Dependency configuration](https://hatch.pypa.io/latest/config/dependency/) for more details on the topic.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "wizard-template"
description = "A template for a python project containing a package, tests, docs, and CI/CD."
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [{ name = "fschuch", email = "[email protected]" }]
classifiers = [
"Intended Audience :: Developers",
Expand All @@ -17,7 +17,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
Expand Down Expand Up @@ -108,7 +108,7 @@ extra-dependencies = ["pytest-randomly", "pytest-rerunfailures", "pytest-xdist"]
extended = "test -n auto --reruns 7 --reruns-delay 1 {args}"

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Python 3.13 is not yet supported in GitHub Actions

While Python 3.13 is included in the test matrix, it's currently not available in GitHub Actions. The latest available version is 3.14.0-alpha, but it's an unstable development version. The workflows are currently using Python 3.12, which is the latest stable version.

  • Remove Python 3.13 from the test matrix in pyproject.toml as it's not yet supported
  • Consider re-adding it once it becomes available in GitHub Actions setup-python action
🔗 Analysis chain

Verify Python 3.13 availability in CI environment.

The test matrix updates correctly reflect the version changes, but since Python 3.13 is still in development, we should verify its availability in the CI environment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if GitHub Actions supports Python 3.13
gh api repos/actions/python-versions/releases/latest --jq '.tag_name' || \
  echo "Failed to fetch Python versions. Please verify Python 3.13 support in your CI environment manually."

Length of output: 96


Script:

#!/bin/bash
# Check GitHub Actions workflow files for Python setup
fd -e yml -e yaml . .github/workflows/ -x cat {} \; | grep -A 5 "setup-python"

Length of output: 932


[tool.hatch.envs.docs]
description = "Documentation environment"
Expand Down