Skip to content

Commit aef6e1a

Browse files
committed
- apply latest meta templates, drop support for Python 3.8
1 parent 781ea47 commit aef6e1a

File tree

10 files changed

+120
-28
lines changed

10 files changed

+120
-28
lines changed

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 2 deletions
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/action@v3.0.1
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

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# native support. It works, but is slow.
3131
#
3232
# Another major downside: You can't just re-run the job for one part
33-
# of the matrix. So if there's a transient test failure that hit, say, 3.8,
33+
# of the matrix. So if there's a transient test failure that hit, say, 3.11,
3434
# to get a clean run every version of Python runs again. That's bad.
3535
# https://github.community/t/ability-to-rerun-just-a-single-job-in-a-workflow/17234/65
3636

@@ -97,7 +97,6 @@ jobs:
9797
matrix:
9898
python-version:
9999
- "pypy-3.10"
100-
- "3.8"
101100
- "3.9"
102101
- "3.10"
103102
- "3.11"
@@ -112,6 +111,8 @@ jobs:
112111
steps:
113112
- name: checkout
114113
uses: actions/checkout@v4
114+
with:
115+
persist-credentials: false
115116
- name: Set up Python ${{ matrix.python-version }}
116117
uses: actions/setup-python@v5
117118
with:
@@ -157,12 +158,12 @@ jobs:
157158
if: matrix.python-version == '3.14'
158159
run: |
159160
pip install -U pip
160-
pip install -U "setuptools < 74" wheel twine
161+
pip install -U "setuptools <= 75.6.0" wheel twine
161162
- name: Install Build Dependencies
162163
if: matrix.python-version != '3.14'
163164
run: |
164165
pip install -U pip
165-
pip install -U "setuptools < 74" wheel twine
166+
pip install -U "setuptools <= 75.6.0" wheel twine
166167
167168
- name: Build ExtensionClass (macOS x86_64)
168169
if: >
@@ -265,7 +266,6 @@ jobs:
265266
matrix:
266267
python-version:
267268
- "pypy-3.10"
268-
- "3.8"
269269
- "3.9"
270270
- "3.10"
271271
- "3.11"
@@ -280,6 +280,8 @@ jobs:
280280
steps:
281281
- name: checkout
282282
uses: actions/checkout@v4
283+
with:
284+
persist-credentials: false
283285
- name: Set up Python ${{ matrix.python-version }}
284286
uses: actions/setup-python@v5
285287
with:
@@ -329,7 +331,7 @@ jobs:
329331
- name: Install ExtensionClass ${{ matrix.python-version }}
330332
if: matrix.python-version == '3.14'
331333
run: |
332-
pip install -U wheel "setuptools < 74"
334+
pip install -U wheel "setuptools <= 75.6.0"
333335
# coverage might have a wheel on PyPI for a future python version which is
334336
# not ABI compatible with the current one, so build it from sdist:
335337
pip install -U --no-binary :all: coverage[toml]
@@ -343,7 +345,7 @@ jobs:
343345
- name: Install ExtensionClass
344346
if: matrix.python-version != '3.14'
345347
run: |
346-
pip install -U wheel "setuptools < 74"
348+
pip install -U wheel "setuptools <= 75.6.0"
347349
pip install -U coverage[toml]
348350
pip install -U 'cffi; platform_python_implementation == "CPython"'
349351
# Unzip into src/ so that testrunner can find the .so files
@@ -381,6 +383,76 @@ jobs:
381383
with:
382384
parallel-finished: true
383385

386+
release-check:
387+
needs: build-package
388+
runs-on: "ubuntu-latest"
389+
strategy:
390+
matrix:
391+
python-version: ["3.11"]
392+
os: [ubuntu-latest]
393+
394+
steps:
395+
- name: checkout
396+
uses: actions/checkout@v4
397+
with:
398+
persist-credentials: false
399+
- name: Set up Python ${{ matrix.python-version }}
400+
uses: actions/setup-python@v5
401+
with:
402+
python-version: ${{ matrix.python-version }}
403+
allow-prereleases: true
404+
###
405+
# Caching.
406+
# This actually *restores* a cache and schedules a cleanup action
407+
# to save the cache. So it must come before the thing we want to use
408+
# the cache.
409+
###
410+
- name: Get pip cache dir (default)
411+
id: pip-cache-default
412+
if: ${{ !startsWith(runner.os, 'Windows') }}
413+
run: |
414+
echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT
415+
416+
- name: Get pip cache dir (Windows)
417+
id: pip-cache-windows
418+
if: ${{ startsWith(runner.os, 'Windows') }}
419+
run: |
420+
echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT
421+
422+
- name: pip cache (default)
423+
uses: actions/cache@v4
424+
if: ${{ !startsWith(runner.os, 'Windows') }}
425+
with:
426+
path: ${{ steps.pip-cache-default.outputs.dir }}
427+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
428+
restore-keys: |
429+
${{ runner.os }}-pip-
430+
431+
- name: pip cache (Windows)
432+
uses: actions/cache@v4
433+
if: ${{ startsWith(runner.os, 'Windows') }}
434+
with:
435+
path: ${{ steps.pip-cache-windows.outputs.dir }}
436+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
437+
restore-keys: |
438+
${{ runner.os }}-pip-
439+
440+
- name: Download ExtensionClass wheel
441+
uses: actions/download-artifact@v4
442+
with:
443+
name: ExtensionClass-${{ runner.os }}-${{ matrix.python-version }}.whl
444+
path: dist/
445+
- name: Install ExtensionClass
446+
run: |
447+
pip install -U wheel
448+
pip install -U tox
449+
pip install -U "`ls dist/ExtensionClass-*.whl`[docs]"
450+
- name: Run release check
451+
env:
452+
ZOPE_INTERFACE_STRICT_IRO: 1
453+
run: |
454+
tox -e release-check
455+
384456
manylinux:
385457
runs-on: ubuntu-latest
386458
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
@@ -393,6 +465,8 @@ jobs:
393465
steps:
394466
- name: checkout
395467
uses: actions/checkout@v4
468+
with:
469+
persist-credentials: false
396470
- name: Set up Python ${{ matrix.python-version }}
397471
uses: actions/setup-python@v5
398472
with:

.manylinux-install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ yum -y install libffi-devel
2828

2929
tox_env_map() {
3030
case $1 in
31-
*"cp38"*) echo 'py38';;
3231
*"cp39"*) echo 'py39';;
3332
*"cp310"*) echo 'py310';;
3433
*"cp311"*) echo 'py311';;
@@ -42,7 +41,6 @@ tox_env_map() {
4241
# Compile wheels
4342
for PYBIN in /opt/python/*/bin; do
4443
if \
45-
[[ "${PYBIN}" == *"cp38/"* ]] || \
4644
[[ "${PYBIN}" == *"cp39/"* ]] || \
4745
[[ "${PYBIN}" == *"cp310/"* ]] || \
4846
[[ "${PYBIN}" == *"cp311/"* ]] || \

.meta.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/c-code
33
[meta]
44
template = "c-code"
5-
commit-id = "baf6089f"
5+
commit-id = "3c1c588c"
66

77
[python]
88
with-windows = true

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
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.0"
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:

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
6.1 (unreleased)
66
================
77

8+
- Drop support for Python 3.8.
9+
810
- Add preliminary support for Python 3.14a2.
911

12+
1013
6.0 (2024-09-17)
1114
================
1215

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
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/c-code
4-
-->
4+
-->
55
# Contributing to zopefoundation projects
66

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

pyproject.toml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# https://github.com/zopefoundation/meta/tree/master/config/c-code
44

55
[build-system]
6-
requires = ["setuptools < 74"]
6+
requires = [
7+
"setuptools <= 75.6.0",
8+
]
79
build-backend = "setuptools.build_meta"
810

911
[tool.coverage.run]
@@ -16,10 +18,23 @@ fail_under = 99.5
1618
precision = 2
1719
ignore_errors = true
1820
show_missing = true
19-
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+
]
2031

2132
[tool.coverage.html]
2233
directory = "parts/htmlcov"
2334

2435
[tool.coverage.paths]
25-
source = ["src/", ".tox/*/lib/python*/site-packages/", ".tox/pypy*/site-packages/"]
36+
source = [
37+
"src/",
38+
".tox/*/lib/python*/site-packages/",
39+
".tox/pypy*/site-packages/",
40+
]

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,21 @@
5555
name='ExtensionClass',
5656
version=version,
5757
url='https://github.com/zopefoundation/ExtensionClass',
58-
license='ZPL 2.1',
58+
license='ZPL-2.1',
5959
description='Metaclass for subclassable extension types',
6060
author='Zope Foundation and Contributors',
61-
author_email='zope-dev@zope.org',
61+
author_email='zope-dev@zope.dev',
6262
long_description='\n\n'.join([README, CHANGES]),
6363
packages=find_packages('src'),
6464
package_dir={'': 'src'},
6565
classifiers=[
6666
"Development Status :: 6 - Mature",
6767
"Environment :: Web Environment",
68-
"Framework :: Zope2",
68+
"Framework :: Zope :: 2",
6969
"License :: OSI Approved :: Zope Public License",
7070
"Operating System :: OS Independent",
7171
"Programming Language :: Python",
7272
"Programming Language :: Python :: 3",
73-
"Programming Language :: Python :: 3.8",
7473
"Programming Language :: Python :: 3.9",
7574
"Programming Language :: Python :: 3.10",
7675
"Programming Language :: Python :: 3.11",
@@ -87,5 +86,5 @@
8786
'zope.testrunner',
8887
],
8988
},
90-
python_requires='>=3.8',
89+
python_requires='>=3.9',
9190
)

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[tox]
44
minversion = 4.0
55
envlist =
6+
release-check
67
lint
7-
py38,py38-pure
88
py39,py39-pure
99
py310,py310-pure
1010
py311,py311-pure
@@ -17,7 +17,7 @@ envlist =
1717
[testenv]
1818
pip_pre = py314: true
1919
deps =
20-
setuptools < 74
20+
setuptools <= 75.6.0
2121
setenv =
2222
pure: PURE_PYTHON=1
2323
!pure-!pypy3: PURE_PYTHON=0
@@ -50,7 +50,7 @@ description = ensure that the distribution is ready to release
5050
basepython = python3
5151
skip_install = true
5252
deps =
53-
setuptools < 74
53+
setuptools <= 75.6.0
5454
twine
5555
build
5656
check-manifest

0 commit comments

Comments
 (0)