Skip to content

Commit

Permalink
Add Python 3.12 support
Browse files Browse the repository at this point in the history
- Include Python 3.12 classifier in PyPI package
- Build and publish PyPI package using Python 3.12
- Run tests with Python 3.12, in addition to 3.10-3.11

https://docs.python.org/3/whatsnew/3.12.html
  • Loading branch information
br3ndonland committed Apr 10, 2024
1 parent 41b5a68 commit a2b26a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
env:
HATCH_ENV: "ci"
HATCH_VERSION: "1.9.4"
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
*) echo "Incorrect Hatch virtualenv." && exit 1 ;;
esac
- name: Test that Git tag version and Python package version match
if: github.ref_type == 'tag' && matrix.python-version == '3.11'
if: github.ref_type == 'tag' && matrix.python-version == '3.12'
run: |
GIT_TAG_VERSION=$GITHUB_REF_NAME
PACKAGE_VERSION=$(hatch version)
Expand All @@ -75,5 +75,5 @@ jobs:
- name: Build Python package
run: hatch build
- name: Publish Python package to PyPI
if: github.ref_type == 'tag' && matrix.python-version == '3.11'
if: github.ref_type == 'tag' && matrix.python-version == '3.12'
run: hatch publish -n -u __token__ -a ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dependencies = []
Expand Down

0 comments on commit a2b26a2

Please sign in to comment.