Skip to content

Commit b224ada

Browse files
authored
Update Python version support. (#68)
* Drop support for Python 3.8. * Configuring for zope-product * Update Python version support.
1 parent 2ce6236 commit b224ada

9 files changed

+52
-41
lines changed

.github/workflows/pre-commit.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@ env:
1515

1616
jobs:
1717
pre-commit:
18+
permissions:
19+
contents: read
20+
pull-requests: write
1821
name: linting
1922
runs-on: ubuntu-latest
2023
steps:
2124
- uses: actions/checkout@v4
2225
- uses: actions/setup-python@v5
2326
with:
2427
python-version: 3.x
25-
- uses: pre-commit/[email protected]
28+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
2629
with:
2730
extra_args: --all-files --show-diff-on-failure
2831
env:
2932
PRE_COMMIT_COLOR: always
30-
- uses: pre-commit-ci/lite-action@v1.0.2
33+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 #v1.1.0
3134
if: always()
3235
with:
3336
msg: Apply pre-commit code formatting

.github/workflows/tests.yml

+15-20
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212

1313
jobs:
1414
build:
15+
permissions:
16+
contents: read
17+
pull-requests: write
1518
strategy:
1619
# We want to see all failures:
1720
fail-fast: false
@@ -21,7 +24,6 @@ jobs:
2124
config:
2225
# [Python version, tox env]
2326
- ["3.11", "release-check"]
24-
- ["3.8", "py38"]
2527
- ["3.9", "py39"]
2628
- ["3.10", "py310"]
2729
- ["3.11", "py311"]
@@ -34,33 +36,26 @@ jobs:
3436
name: ${{ matrix.config[1] }}
3537
steps:
3638
- uses: actions/checkout@v4
37-
- name: Set up Python
38-
uses: actions/setup-python@v5
3939
with:
40-
python-version: ${{ matrix.config[0] }}
41-
allow-prereleases: true
42-
- name: Pip cache
43-
uses: actions/cache@v4
40+
persist-credentials: false
41+
- name: Install uv + caching
42+
uses: astral-sh/setup-uv@v5
4443
with:
45-
path: ~/.cache/pip
46-
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
47-
restore-keys: |
48-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
49-
${{ runner.os }}-pip-
50-
- name: Install dependencies
51-
run: |
52-
python -m pip install --upgrade pip
53-
pip install tox
44+
enable-cache: true
45+
cache-dependency-glob: |
46+
setup.*
47+
tox.ini
48+
python-version: ${{ matrix.matrix.config[0] }}
49+
github-token: ${{ secrets.GITHUB_TOKEN }}
5450
- name: Test
5551
if: ${{ !startsWith(runner.os, 'Mac') }}
56-
run: tox -e ${{ matrix.config[1] }}
52+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
5753
- name: Test (macOS)
5854
if: ${{ startsWith(runner.os, 'Mac') }}
59-
run: tox -e ${{ matrix.config[1] }}-universal2
55+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6056
- name: Coverage
6157
if: matrix.config[1] == 'coverage'
6258
run: |
63-
pip install coveralls
64-
coveralls --service=github
59+
uvx coveralls --service=github
6560
env:
6661
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.meta.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
33
[meta]
44
template = "zope-product"
5-
commit-id = "93bf5454"
5+
commit-id = "a0de4e93"
66

77
[python]
88
with-pypy = false

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
minimum_pre_commit_version: '3.6'
44
repos:
55
- repo: https://github.com/pycqa/isort
6-
rev: "5.13.2"
6+
rev: "6.0.1"
77
hooks:
88
- id: isort
99
- repo: https://github.com/hhatto/autopep8
10-
rev: "v2.3.1"
10+
rev: "v2.3.2"
1111
hooks:
1212
- id: autopep8
1313
args: [--in-place, --aggressive, --aggressive]
1414
- repo: https://github.com/asottile/pyupgrade
15-
rev: v3.17.0
15+
rev: v3.19.1
1616
hooks:
1717
- id: pyupgrade
18-
args: [--py38-plus]
18+
args: [--py39-plus]
1919
- repo: https://github.com/isidentical/teyit
2020
rev: 0.4.3
2121
hooks:
2222
- id: teyit
2323
- repo: https://github.com/PyCQA/flake8
24-
rev: "7.1.1"
24+
rev: "7.1.2"
2525
hooks:
2626
- id: flake8
2727
additional_dependencies:

CHANGES.rst

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changelog
55
----------------
66

77

8+
- Drop support for Python 3.8.
9+
810
5.1 (2024-10-16)
911
----------------
1012

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
Generated from:
33
https://github.com/zopefoundation/meta/tree/master/config/zope-product
4-
-->
4+
-->
55
# Contributing to zopefoundation projects
66

77
The projects under the zopefoundation GitHub organization are open source and

pyproject.toml

+14-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
44

55
[build-system]
6-
requires = ["setuptools < 74"]
6+
requires = [
7+
"setuptools == 75.8.2",
8+
"wheel",
9+
]
710
build-backend = "setuptools.build_meta"
811

912
[tool.coverage.run]
@@ -15,7 +18,16 @@ fail_under = 83
1518
precision = 2
1619
ignore_errors = true
1720
show_missing = true
18-
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
21+
exclude_lines = [
22+
"pragma: no cover",
23+
"pragma: nocover",
24+
"except ImportError:",
25+
"raise NotImplementedError",
26+
"if __name__ == '__main__':",
27+
"self.fail",
28+
"raise AssertionError",
29+
"raise unittest.Skip",
30+
]
1931

2032
[tool.coverage.html]
2133
directory = "parts/htmlcov"

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
'Sources': ('https://github.com/zopefoundation/'
2626
'Products.PythonScripts'),
2727
},
28-
license='ZPL 2.1',
28+
license='ZPL-2.1',
2929
description='Provides support for restricted execution of Python '
3030
'scripts in Zope.',
3131
author='Zope Foundation and Contributors',
@@ -44,15 +44,14 @@
4444
'Operating System :: OS Independent',
4545
'Programming Language :: Python',
4646
'Programming Language :: Python :: 3',
47-
'Programming Language :: Python :: 3.8',
4847
'Programming Language :: Python :: 3.9',
4948
'Programming Language :: Python :: 3.10',
5049
'Programming Language :: Python :: 3.11',
5150
'Programming Language :: Python :: 3.12',
5251
'Programming Language :: Python :: 3.13',
5352
'Programming Language :: Python :: Implementation :: CPython',
5453
],
55-
python_requires='>=3.8',
54+
python_requires='>=3.9',
5655
install_requires=[
5756
'setuptools',
5857
'AccessControl',

tox.ini

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ minversion = 3.18
55
envlist =
66
release-check
77
lint
8-
py38
98
py39
109
py310
1110
py311
@@ -16,9 +15,9 @@ envlist =
1615
[testenv]
1716
skip_install = true
1817
deps =
19-
setuptools < 74
20-
zc.buildout >= 3.1
21-
wheel > 0.37
18+
setuptools == 75.8.2
19+
zc.buildout
20+
wheel
2221
setenv =
2322
commands_pre =
2423
{envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
@@ -29,16 +28,17 @@ commands =
2928
basepython = python3
3029
deps =
3130
git+https://github.com/pypa/setuptools.git\#egg=setuptools
32-
zc.buildout >= 3.1
33-
wheel > 0.37
31+
zc.buildout
32+
wheel
3433

3534

3635
[testenv:release-check]
3736
description = ensure that the distribution is ready to release
3837
basepython = python3
3938
skip_install = true
4039
deps =
41-
setuptools < 74
40+
setuptools == 75.8.2
41+
wheel
4242
twine
4343
build
4444
check-manifest

0 commit comments

Comments
 (0)