Skip to content

Commit 94424a1

Browse files
smarieSylvain MARIE
andauthored
Dropped support for python <3.9 and pytest <6 (#369)
* Upgraded github actions to fix the major numbers only, and added a proper explicit github pages deployment * Dropped support for `python<3.9` and `pytest<6`. Fixes #362 and fixes #186 * Changelog * fixed python version for base nox * Fixed setup.py * Added upper bound on pytest version for now --------- Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
1 parent 36f4053 commit 94424a1

File tree

12 files changed

+165
-153
lines changed

12 files changed

+165
-153
lines changed

.github/workflows/base.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v4.1.1
26+
uses: actions/checkout@v4
2727

28-
- name: Install python 3.9
29-
uses: actions/setup-python@v5.1.0
28+
- name: Install python 3.11
29+
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.9
31+
python-version: 3.11
3232
architecture: x64
3333

3434
- name: Install noxfile requirements
@@ -57,11 +57,11 @@ jobs:
5757
runs-on: ${{ matrix.os }}
5858
steps:
5959
- name: Checkout
60-
uses: actions/checkout@v4.1.1
60+
uses: actions/checkout@v4
6161

6262
# General case
63-
- name: Install python ${{ matrix.nox_session.python }} for tests (not 3.5 not 3.13)
64-
if: ${{ ! contains(fromJson('["3.5", "3.13"]'), matrix.nox_session.python ) }}
63+
- name: Install python ${{ matrix.nox_session.python }} for tests (not 3.5 not 3.14)
64+
if: ${{ ! contains(fromJson('["3.5", "3.14"]'), matrix.nox_session.python ) }}
6565
uses: MatteoH2O1999/setup-python@v4 # actions/setup-python@v5.0.0
6666
id: set-py
6767
with:
@@ -86,8 +86,8 @@ jobs:
8686
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
8787

8888

89-
- name: Install python ${{ matrix.nox_session.python }} for tests (3.13)
90-
if: contains(fromJson('["3.13"]'), matrix.nox_session.python )
89+
- name: Install python ${{ matrix.nox_session.python }} for tests (3.14)
90+
if: contains(fromJson('["3.14"]'), matrix.nox_session.python )
9191
uses: actions/setup-python@v5
9292
id: set-py-latest
9393
with:
@@ -99,7 +99,7 @@ jobs:
9999
cache-build: true
100100

101101
- name: Install python 3.12 for nox
102-
uses: actions/setup-python@v5.1.0
102+
uses: actions/setup-python@v5
103103
with:
104104
python-version: 3.12
105105
architecture: x64
@@ -118,7 +118,7 @@ jobs:
118118
# Share ./docs/reports so that they can be deployed with doc in next job
119119
- name: Share reports with other jobs
120120
if: runner.os == 'Linux'
121-
uses: actions/upload-artifact@v4.3.1
121+
uses: actions/upload-artifact@v4
122122
with:
123123
name: reports_dir
124124
path: ./docs/reports
@@ -128,12 +128,12 @@ jobs:
128128
if: github.event_name == 'pull_request'
129129
steps:
130130
- name: Checkout
131-
uses: actions/checkout@v4.1.1
131+
uses: actions/checkout@v4
132132

133-
- name: Install python 3.9 for nox
134-
uses: actions/setup-python@v5.1.0
133+
- name: Install python 3.11 for nox
134+
uses: actions/setup-python@v5
135135
with:
136-
python-version: 3.9
136+
python-version: 3.11
137137
architecture: x64
138138

139139
- name: Install noxfile requirements
@@ -153,19 +153,20 @@ jobs:
153153
run: echo "$GITHUB_CONTEXT"
154154

155155
- name: Checkout with no depth
156-
uses: actions/checkout@v4.1.1
156+
uses: actions/checkout@v4
157157
with:
158158
fetch-depth: 0 # so that gh-deploy works
159+
# persist-credentials: false # see https://github.com/orgs/community/discussions/25702
159160

160-
- name: Install python 3.9 for nox
161-
uses: actions/setup-python@v5.1.0
161+
- name: Install python 3.11 for nox
162+
uses: actions/setup-python@v5
162163
with:
163-
python-version: 3.9
164+
python-version: 3.11
164165
architecture: x64
165166

166167
# 1) retrieve the reports generated previously
167168
- name: Retrieve reports
168-
uses: actions/download-artifact@v4.1.4
169+
uses: actions/download-artifact@v4
169170
with:
170171
name: reports_dir
171172
path: ./docs/reports
@@ -197,7 +198,7 @@ jobs:
197198
EOF
198199
- name: \[not on TAG\] Publish coverage report
199200
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads')
200-
uses: codecov/codecov-action@v4.1.1
201+
uses: codecov/codecov-action@v4
201202
with:
202203
files: ./docs/reports/coverage/coverage.xml
203204
- name: \[not on TAG\] Build wheel and sdist
@@ -209,7 +210,11 @@ jobs:
209210
# 7) Create github release and build the wheel
210211
- name: \[TAG only\] Build wheel and create github release
211212
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
212-
run: nox -s release -- ${{ secrets.GITHUB_TOKEN }}
213+
# We would have to use a PAT instead of GITHUB_TOKEN if we want the next job to trigger.
214+
# See https://github.com/orgs/community/discussions/25702
215+
# For now we will rather rely on a "workflow completed" trigger to avoid
216+
# having a token expiration date to manage
217+
run: nox -s release -- ${{ secrets.GITHUB_TOKEN }} # ${{ secrets.WORKFLOW_SECRET}}
213218

214219
# 8) Publish the wheel on PyPi
215220
- name: \[TAG only\] Deploy on PyPi

.github/workflows/ghpages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy Static Website from gh-pages branch
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["gh-pages"]
8+
9+
# Since the pushes made by the workflow using GITHUB_TOKEN do not trigger the above,
10+
# Add an explicit trigger for workflow completion
11+
workflow_run:
12+
workflows: ['Build']
13+
types: [completed]
14+
branches:
15+
- 'main'
16+
17+
# Allows you to run this workflow manually from the Actions tab
18+
workflow_dispatch:
19+
20+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
21+
permissions:
22+
contents: read
23+
pages: write
24+
id-token: write
25+
26+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
27+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
28+
concurrency:
29+
group: "pages"
30+
cancel-in-progress: false
31+
32+
jobs:
33+
# Single deploy job since we're just deploying
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
with:
43+
ref: gh-pages
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v5
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
# Upload entire repository
50+
path: '.'
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/updater.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4.1.1
15+
- uses: actions/checkout@v4
1616
with:
1717
# [Required] Access token with `workflow` scope.
1818
token: ${{ secrets.WORKFLOW_SECRET }}
1919

2020
- name: Run GitHub Actions Version Updater
21-
uses: saadmk11/github-actions-version-updater@v0.8.1
21+
uses: saadmk11/github-actions-version-updater@v0.8
2222
with:
2323
# [Required] Access token with `workflow` scope.
2424
token: ${{ secrets.WORKFLOW_SECRET }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Separate test code from test cases in `pytest`.
44

5-
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) ![Pytest versions](https://img.shields.io/badge/pytest-3%20%7C%204%20%7C%205%20%7C%206%20%7C%207%20%7C%208-blue) [![Build Status](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml) [![Tests Status](https://smarie.github.io/python-pytest-cases/reports/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/junit/report.html) [![Coverage Status](https://smarie.github.io/python-pytest-cases/reports/coverage/coverage-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/coverage/index.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-cases/branch/main/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-cases) [![Flake8 Status](https://smarie.github.io/python-pytest-cases/reports/flake8/flake8-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/flake8/index.html)
5+
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) ![Pytest versions](https://img.shields.io/badge/pytest-6%20%7C%207%20%7C%208-blue) [![Build Status](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml) [![Tests Status](https://smarie.github.io/python-pytest-cases/reports/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/junit/report.html) [![Coverage Status](https://smarie.github.io/python-pytest-cases/reports/coverage/coverage-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/coverage/index.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-cases/branch/main/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-cases) [![Flake8 Status](https://smarie.github.io/python-pytest-cases/reports/flake8/flake8-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/flake8/index.html)
66

77
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://smarie.github.io/python-pytest-cases/) [![PyPI](https://img.shields.io/pypi/v/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) [![Downloads](https://pepy.tech/badge/pytest-cases)](https://pepy.tech/project/pytest-cases) [![Downloads per week](https://pepy.tech/badge/pytest-cases/week)](https://pepy.tech/project/pytest-cases) [![GitHub stars](https://img.shields.io/github/stars/smarie/python-pytest-cases.svg)](https://github.com/smarie/python-pytest-cases/stargazers) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3937829.svg)](https://doi.org/10.5281/zenodo.3937829)
88

ci_tools/nox_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
nox_logger = logging.getLogger("nox")
1313

1414

15-
PY27, PY35, PY36, PY37, PY38, PY39, PY310, PY311, PY312, PY313 = ("2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10",
16-
"3.11", "3.12", "3.13")
15+
PY27, PY35, PY36, PY37, PY38, PY39, PY310, PY311, PY312, PY313, PY314 = (
16+
"2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"
17+
)
1718
DONT_INSTALL = "dont_install"
1819

1920

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### 3.8.7 - compatibility with pytest 8.6.0
4+
5+
- Dropped support for `python<3.9` and `pytest<6`. Fixes
6+
[#362](https://github.com/smarie/python-pytest-cases/issues/362) and fixes
7+
[#186](https://github.com/smarie/python-pytest-cases/issues/186)
8+
39
### 3.8.6 - compatibility fix
410

511
- Fixed issue with legacy python 2.7 and 3.5. Fixes [#352](https://github.com/smarie/python-pytest-cases/issues/352).

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*Separate test code from test cases in `pytest`.*
44

5-
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) ![Pytest versions](https://img.shields.io/badge/pytest-3%20%7C%204%20%7C%205%20%7C%206%20%7C%207%20%7C%208-blue) [![Build Status](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml) [![Tests Status](./reports/junit/junit-badge.svg?dummy=8484744)](./reports/junit/report.html) [![Coverage Status](./reports/coverage/coverage-badge.svg?dummy=8484744)](./reports/coverage/index.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-cases/branch/main/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-cases) [![Flake8 Status](./reports/flake8/flake8-badge.svg?dummy=8484744)](./reports/flake8/index.html)
5+
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) ![Pytest versions](https://img.shields.io/badge/pytest-6%20%7C%207%20%7C%208-blue) [![Build Status](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml) [![Tests Status](./reports/junit/junit-badge.svg?dummy=8484744)](./reports/junit/report.html) [![Coverage Status](./reports/coverage/coverage-badge.svg?dummy=8484744)](./reports/coverage/index.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-cases/branch/main/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-cases) [![Flake8 Status](./reports/flake8/flake8-badge.svg?dummy=8484744)](./reports/flake8/index.html)
66

77
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://smarie.github.io/python-pytest-cases/) [![PyPI](https://img.shields.io/pypi/v/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) [![Downloads](https://pepy.tech/badge/pytest-cases)](https://pepy.tech/project/pytest-cases) [![Downloads per week](https://pepy.tech/badge/pytest-cases/week)](https://pepy.tech/project/pytest-cases) [![GitHub stars](https://img.shields.io/github/stars/smarie/python-pytest-cases.svg)](https://github.com/smarie/python-pytest-cases/stargazers)
88
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3937829.svg)](https://doi.org/10.5281/zenodo.3937829)

docs/long_description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pytest-cases
22

3-
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) ![Pytest versions](https://img.shields.io/badge/pytest-2%20%7C%203%20%7C%204%20%7C%205%20%7C%206%20%7C%207-blue) [![Build Status](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml) [![Tests Status](https://smarie.github.io/python-pytest-cases/reports/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/junit/report.html) [![Coverage Status](https://smarie.github.io/python-pytest-cases/reports/coverage/coverage-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/coverage/index.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-cases/branch/main/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-cases) [![Flake8 Status](https://smarie.github.io/python-pytest-cases/reports/flake8/flake8-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/flake8/index.html)
3+
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) ![Pytest versions](https://img.shields.io/badge/pytest-6%20%7C%207%20%7C%208-blue) [![Build Status](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml/badge.svg)](https://github.com/smarie/python-pytest-cases/actions/workflows/base.yml) [![Tests Status](https://smarie.github.io/python-pytest-cases/reports/junit/junit-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/junit/report.html) [![Coverage Status](https://smarie.github.io/python-pytest-cases/reports/coverage/coverage-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/coverage/index.html) [![codecov](https://codecov.io/gh/smarie/python-pytest-cases/branch/main/graph/badge.svg)](https://codecov.io/gh/smarie/python-pytest-cases) [![Flake8 Status](https://smarie.github.io/python-pytest-cases/reports/flake8/flake8-badge.svg?dummy=8484744)](https://smarie.github.io/python-pytest-cases/reports/flake8/index.html)
44

55
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://smarie.github.io/python-pytest-cases/) [![PyPI](https://img.shields.io/pypi/v/pytest-cases.svg)](https://pypi.python.org/pypi/pytest-cases/) [![Downloads](https://pepy.tech/badge/pytest-cases)](https://pepy.tech/project/pytest-cases) [![Downloads per week](https://pepy.tech/badge/pytest-cases/week)](https://pepy.tech/project/pytest-cases) [![GitHub stars](https://img.shields.io/github/stars/smarie/python-pytest-cases.svg)](https://github.com/smarie/python-pytest-cases/stargazers) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3937829.svg)](https://doi.org/10.5281/zenodo.3937829)
66

0 commit comments

Comments
 (0)