Skip to content

Commit

Permalink
Support python 3.13 (#26)
Browse files Browse the repository at this point in the history
* Support python 3.13

* Update CHANGELOG [ci skip]
  • Loading branch information
DriesSchaumont authored Nov 19, 2024
1 parent 4507e2c commit 79ca2fa
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 10 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Publish Python 🐍 distribution 📦 to PyPI

on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
push:
tags:
- '*'


jobs:
build:
name: Build distribution 📦
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version && github.event.inputs.version || github.ref_name }}

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: deployment
url: https://pypi.org/p/viashpy
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Changelog
*********

0.9.0 (19/07/2024)
==================

New Functionality
-----------------

* Add support for python 3.13 (#26)

0.8.0 (29/07/2024)
==================

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ To run the tests, clone the repository and install the development requirements
pip install .[dev] # Do not forget to quote this if you are using zsh
```

By default, viashpy can tested against different python versions (more specifically 3.7 to 3.11) using `tox`.
By default, viashpy can tested against different python versions (more specifically 3.8 to 3.13) using `tox`.
These versions of python must be made available to tox (by adding them to your `PATH` environment variable), for example by installing and enabling them using `pyenv`.

Afterwards, running the tests is a matter of executing:
```bash
tox .
tox
```

Alternatively, if you wish to test for the python version installed on your system only, you can choose to only test `-e` parameter.
```bash
# Uses python3.7
tox -e py3.7
# Uses python3.8
tox -e py3.8
```

# License
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = 'setuptools.build_meta'
write_to = "viashpy/__version__.py"

[tool.black]
target-version = ['py39', 'py310', 'py311', 'py312']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
exclude = '''
(
\.egg
Expand Down
9 changes: 5 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ classifiers =
Topic :: Software Development :: Testing
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
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
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3 :: Only
Operating System :: OS Independent
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[tox]
envlist =
py{38,39}-pytest{62}
py{39,310,311,312}-pytest{70,71,72,73,74,80,81}
py{39,310,311,312}-pytest{70,71,72,73,74,80,81,82,83}
flake8
isolated_build = True

Expand All @@ -16,6 +16,8 @@ deps =
pytest74: pytest>=7.4,<7.5
pytest80: pytest>=8.0,<8.1
pytest81: pytest>=8.1,<8.2
pytest82: pytest>=8.2,<8.3
pytest83: pytest>=8.3,<8.4
coverage
pytest-mock
commands =
Expand Down

0 comments on commit 79ca2fa

Please sign in to comment.