Skip to content

Commit 79ca2fa

Browse files
Support python 3.13 (#26)
* Support python 3.13 * Update CHANGELOG [ci skip]
1 parent 4507e2c commit 79ca2fa

File tree

6 files changed

+124
-10
lines changed

6 files changed

+124
-10
lines changed

.github/workflows/deploy.yaml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version'
8+
required: true
9+
push:
10+
tags:
11+
- '*'
12+
13+
14+
jobs:
15+
build:
16+
name: Build distribution 📦
17+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
18+
runs-on: ubuntu-latest
19+
env:
20+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version && github.event.inputs.version || github.ref_name }}
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.8"
28+
- name: Install pypa/build
29+
run: >-
30+
python3 -m
31+
pip install
32+
build
33+
--user
34+
- name: Build a binary wheel and a source tarball
35+
run: python3 -m build
36+
- name: Store the distribution packages
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: python-package-distributions
40+
path: dist/
41+
42+
publish-to-pypi:
43+
name: >-
44+
Publish Python 🐍 distribution 📦 to PyPI
45+
needs:
46+
- build
47+
runs-on: ubuntu-latest
48+
environment:
49+
name: deployment
50+
url: https://pypi.org/p/viashpy
51+
permissions:
52+
id-token: write # IMPORTANT: mandatory for trusted publishing
53+
54+
steps:
55+
- name: Download all the dists
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: python-package-distributions
59+
path: dist/
60+
- name: Publish distribution 📦 to PyPI
61+
uses: pypa/gh-action-pypi-publish@release/v1
62+
63+
github-release:
64+
name: >-
65+
Sign the Python 🐍 distribution 📦 with Sigstore
66+
and upload them to GitHub Release
67+
needs:
68+
- publish-to-pypi
69+
runs-on: ubuntu-latest
70+
71+
permissions:
72+
contents: write # IMPORTANT: mandatory for making GitHub Releases
73+
id-token: write # IMPORTANT: mandatory for sigstore
74+
75+
steps:
76+
- name: Download all the dists
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: python-package-distributions
80+
path: dist/
81+
- name: Sign the dists with Sigstore
82+
uses: sigstore/gh-action-sigstore-python@v3.0.0
83+
with:
84+
inputs: >-
85+
./dist/*.tar.gz
86+
./dist/*.whl
87+
- name: Create GitHub Release
88+
env:
89+
GITHUB_TOKEN: ${{ github.token }}
90+
run: >-
91+
gh release create
92+
'${{ github.ref_name }}'
93+
--repo '${{ github.repository }}'
94+
--notes ""
95+
- name: Upload artifact signatures to GitHub Release
96+
env:
97+
GITHUB_TOKEN: ${{ github.token }}
98+
# Upload to GitHub Release using the `gh` CLI.
99+
# `dist/` contains the built packages, and the
100+
# sigstore-produced signatures and certificates.
101+
run: >-
102+
gh release upload
103+
'${{ github.ref_name }}' dist/**

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
Changelog
33
*********
44

5+
0.9.0 (19/07/2024)
6+
==================
7+
8+
New Functionality
9+
-----------------
10+
11+
* Add support for python 3.13 (#26)
12+
513
0.8.0 (29/07/2024)
614
==================
715

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ To run the tests, clone the repository and install the development requirements
1515
pip install .[dev] # Do not forget to quote this if you are using zsh
1616
```
1717

18-
By default, viashpy can tested against different python versions (more specifically 3.7 to 3.11) using `tox`.
18+
By default, viashpy can tested against different python versions (more specifically 3.8 to 3.13) using `tox`.
1919
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`.
2020

2121
Afterwards, running the tests is a matter of executing:
2222
```bash
23-
tox .
23+
tox
2424
```
2525

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

3232
# License

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = 'setuptools.build_meta'
66
write_to = "viashpy/__version__.py"
77

88
[tool.black]
9-
target-version = ['py39', 'py310', 'py311', 'py312']
9+
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
1010
exclude = '''
1111
(
1212
\.egg

setup.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ classifiers =
3434
Topic :: Software Development :: Testing
3535
Programming Language :: Python
3636
Programming Language :: Python :: 3
37-
Programming Language :: Python :: 3.5
38-
Programming Language :: Python :: 3.6
39-
Programming Language :: Python :: 3.7
40-
Programming Language :: Python :: 3.8
37+
Programming Language :: Python :: 3.9
38+
Programming Language :: Python :: 3.10
39+
Programming Language :: Python :: 3.11
40+
Programming Language :: Python :: 3.12
41+
Programming Language :: Python :: 3.13
4142
Programming Language :: Python :: 3 :: Only
4243
Operating System :: OS Independent
4344
License :: OSI Approved :: GNU General Public License v3 (GPLv3)

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[tox]
33
envlist =
44
py{38,39}-pytest{62}
5-
py{39,310,311,312}-pytest{70,71,72,73,74,80,81}
5+
py{39,310,311,312}-pytest{70,71,72,73,74,80,81,82,83}
66
flake8
77
isolated_build = True
88

@@ -16,6 +16,8 @@ deps =
1616
pytest74: pytest>=7.4,<7.5
1717
pytest80: pytest>=8.0,<8.1
1818
pytest81: pytest>=8.1,<8.2
19+
pytest82: pytest>=8.2,<8.3
20+
pytest83: pytest>=8.3,<8.4
1921
coverage
2022
pytest-mock
2123
commands =

0 commit comments

Comments
 (0)