Skip to content

Commit 4ece516

Browse files
authored
Drop support for Python 3.7 + fix for Sphinx 8 (#49)
1 parent 875a5cc commit 4ece516

File tree

8 files changed

+55
-52
lines changed

8 files changed

+55
-52
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,37 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os:
20-
- ["ubuntu", "ubuntu-20.04"]
20+
- ["ubuntu", "ubuntu-latest"]
2121
- ["windows", "windows-latest"]
2222
config:
2323
# [Python version, tox env]
24-
- ["3.9", "release-check"]
25-
- ["3.9", "lint"]
26-
- ["3.7", "py37"]
24+
- ["3.11", "release-check"]
25+
- ["3.11", "lint"]
2726
- ["3.8", "py38"]
2827
- ["3.9", "py39"]
2928
- ["3.10", "py310"]
3029
- ["3.11", "py311"]
3130
- ["3.12", "py312"]
32-
- ["pypy-3.9", "pypy3"]
33-
- ["3.9", "docs"]
34-
- ["3.9", "coverage"]
31+
- ["pypy-3.10", "pypy3"]
32+
- ["3.11", "docs"]
33+
- ["3.11", "coverage"]
3534
exclude:
36-
- { os: ["windows", "windows-latest"], config: ["3.9", "release-check"] }
37-
- { os: ["windows", "windows-latest"], config: ["3.9", "lint"] }
38-
- { os: ["windows", "windows-latest"], config: ["3.9", "docs"] }
39-
- { os: ["windows", "windows-latest"], config: ["3.9", "coverage"] }
35+
- { os: ["windows", "windows-latest"], config: ["3.11", "release-check"] }
36+
- { os: ["windows", "windows-latest"], config: ["3.11", "lint"] }
37+
- { os: ["windows", "windows-latest"], config: ["3.11", "docs"] }
38+
- { os: ["windows", "windows-latest"], config: ["3.11", "coverage"] }
4039

4140
runs-on: ${{ matrix.os[1] }}
4241
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
4342
name: ${{ matrix.os[0] }}-${{ matrix.config[1] }}
4443
steps:
45-
- uses: actions/checkout@v3
44+
- uses: actions/checkout@v4
4645
- name: Set up Python
47-
uses: actions/setup-python@v4
46+
uses: actions/setup-python@v5
4847
with:
4948
python-version: ${{ matrix.config[0] }}
5049
- name: Pip cache
51-
uses: actions/cache@v3
50+
uses: actions/cache@v4
5251
with:
5352
path: ~/.cache/pip
5453
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
@@ -60,7 +59,11 @@ jobs:
6059
python -m pip install --upgrade pip
6160
pip install tox
6261
- name: Test
62+
if: ${{ !startsWith(runner.os, 'Mac') }}
6363
run: tox -e ${{ matrix.config[1] }}
64+
- name: Test (macOS)
65+
if: ${{ startsWith(runner.os, 'Mac') }}
66+
run: tox -e ${{ matrix.config[1] }}-universal2
6467
- name: Coverage
6568
if: matrix.config[1] == 'coverage'
6669
run: |

.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/pure-python
33
[meta]
44
template = "pure-python"
5-
commit-id = "1a1f5e27"
5+
commit-id = "b93682fc"
66

77
[python]
88
with-pypy = true

CHANGES.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
Changes
33
=========
44

5-
5.0.2 (unreleased)
6-
==================
5+
5.1 (unreleased)
6+
================
7+
8+
- Drop support for Python 3.7.
79

810
- Add support for Python 3.12
911

docs/conf.py

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616
import os
1717
import pkg_resources
18+
1819
sys.path.append(os.path.abspath('../src'))
1920
rqmt = pkg_resources.require('zope.testing')[0]
2021
# Import and document the pure-python versions of things; they tend to have better
@@ -47,7 +48,7 @@
4748
templates_path = ['_templates']
4849

4950
# The suffix of source filenames.
50-
source_suffix = '.rst'
51+
source_suffix = {'.rst': 'restructuredtext'}
5152

5253
# The encoding of source files.
5354
#source_encoding = 'utf-8-sig'
@@ -57,7 +58,7 @@
5758

5859
# General information about the project.
5960
project = 'zope.testing'
60-
copyright = '2012-2021, Zope Foundation contributors'
61+
copyright = '2012-2024, Zope Foundation contributors'
6162

6263
# The version info for the project you're documenting, acts as replacement for
6364
# |version| and |release|, also used in various other places throughout the
@@ -102,7 +103,6 @@
102103
# A list of ignored prefixes for module index sorting.
103104
#modindex_common_prefix = []
104105

105-
106106
# -- Options for HTML output ---------------------------------------------------
107107

108108
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -182,18 +182,17 @@
182182
# Output file base name for HTML help builder.
183183
htmlhelp_basename = 'zopetestingdoc'
184184

185-
186185
# -- Options for LaTeX output --------------------------------------------------
187186

188187
latex_elements = {
189-
# The paper size ('letterpaper' or 'a4paper').
190-
#'papersize': 'letterpaper',
188+
# The paper size ('letterpaper' or 'a4paper').
189+
#'papersize': 'letterpaper',
191190

192-
# The font size ('10pt', '11pt' or '12pt').
193-
#'pointsize': '10pt',
191+
# The font size ('10pt', '11pt' or '12pt').
192+
#'pointsize': '10pt',
194193

195-
# Additional stuff for the LaTeX preamble.
196-
#'preamble': '',
194+
# Additional stuff for the LaTeX preamble.
195+
#'preamble': '',
197196
}
198197

199198
# pdflatex can't handle Cyrillic out of the box, but xetext/lualatex should be
@@ -203,8 +202,8 @@
203202
# Grouping the document tree into LaTeX files. List of tuples
204203
# (source start file, target name, title, author, documentclass [howto/manual]).
205204
latex_documents = [
206-
('index', 'zopetesting.tex', 'zope.testing Documentation',
207-
'Zope Foundation contributors', 'manual'),
205+
('index', 'zopetesting.tex', 'zope.testing Documentation',
206+
'Zope Foundation contributors', 'manual'),
208207
]
209208

210209
# The name of an image file (relative to this directory) to place at the top of
@@ -227,29 +226,25 @@
227226
# If false, no module index is generated.
228227
#latex_domain_indices = True
229228

230-
231229
# -- Options for manual page output --------------------------------------------
232230

233231
# One entry per manual page. List of tuples
234232
# (source start file, name, description, authors, manual section).
235-
man_pages = [
236-
('index', 'zopetesting', 'zope.testing Documentation',
237-
['Zope Foundation contributors'], 1)
238-
]
233+
man_pages = [('index', 'zopetesting', 'zope.testing Documentation',
234+
['Zope Foundation contributors'], 1)]
239235

240236
# If true, show URL addresses after external links.
241237
#man_show_urls = False
242238

243-
244239
# -- Options for Texinfo output ------------------------------------------------
245240

246241
# Grouping the document tree into Texinfo files. List of tuples
247242
# (source start file, target name, title, author,
248243
# dir menu entry, description, category)
249244
texinfo_documents = [
250-
('index', 'zopetesting', 'zope.testing Documentation',
251-
'Zope Foundation contributors', 'zopetesting', 'One line description of project.',
252-
'Miscellaneous'),
245+
('index', 'zopetesting', 'zope.testing Documentation',
246+
'Zope Foundation contributors', 'zopetesting',
247+
'A number of testing frameworks.', 'Miscellaneous'),
253248
]
254249

255250
# Documents to append as an appendix to all manuals.
@@ -261,11 +256,11 @@
261256
# How to display URL addresses: 'footnote', 'no', or 'inline'.
262257
#texinfo_show_urls = 'footnote'
263258

264-
265259
# Example configuration for intersphinx: refer to the Python standard library.
266260
intersphinx_mapping = {
267-
'https://docs.python.org/': None,
268-
'https://zopetestbrowser.readthedocs.io/en/latest/': None,
261+
'python': ('https://docs.python.org/', None),
262+
'zopetestbrowser':
263+
('https://zopetestbrowser.readthedocs.io/en/latest/', None),
269264
}
270265

271266
# Sphinx 1.8+ prefers this to `autodoc_default_flags`. It's documented that

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Generated from:
22
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
3-
[bdist_wheel]
4-
universal = 0
53

64
[flake8]
75
doctests = 1

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def read(*rnames):
3333

3434
setup(
3535
name='zope.testing',
36-
version='5.0.2.dev0',
36+
version='5.1.dev0',
3737
url='https://github.com/zopefoundation/zope.testing',
3838
license='ZPL 2.1',
3939
description='Zope testing helpers',
@@ -47,7 +47,6 @@ def read(*rnames):
4747
"Operating System :: OS Independent",
4848
"Programming Language :: Python",
4949
"Programming Language :: Python :: 3",
50-
"Programming Language :: Python :: 3.7",
5150
"Programming Language :: Python :: 3.8",
5251
"Programming Language :: Python :: 3.9",
5352
"Programming Language :: Python :: 3.10",
@@ -68,7 +67,7 @@ def read(*rnames):
6867
],
6968
package_dir={'': 'src'},
7069
namespace_packages=['zope'],
71-
python_requires='>=3.7',
70+
python_requires='>=3.8',
7271
install_requires=[
7372
'setuptools',
7473
],

src/zope/testing/testrunner.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import warnings
22

33

4-
warnings.warn('zope.testing.testrunner is deprecated in favour of '
5-
'zope.testrunner', DeprecationWarning, stacklevel=2)
4+
warnings.warn(
5+
'zope.testing.testrunner is deprecated in favour of '
6+
'zope.testrunner',
7+
DeprecationWarning,
8+
stacklevel=2)
69

710
try:
811
import zope.testing
912
from zope import testrunner
1013

1114
# Now replace this module with the right one:
1215
zope.testing.testrunner = testrunner
13-
except ImportError:
16+
except ModuleNotFoundError:
1417
pass

tox.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ minversion = 3.18
55
envlist =
66
release-check
77
lint
8-
py37
98
py38
109
py39
1110
py310
@@ -20,6 +19,7 @@ usedevelop = true
2019
package = wheel
2120
wheel_build_env = .pkg
2221
deps =
22+
setuptools < 69
2323
setenv =
2424
py312: VIRTUALENV_PIP=23.1.2
2525
py312: PIP_REQUIRE_VIRTUALENV=0
@@ -29,6 +29,7 @@ commands =
2929
extras =
3030
test
3131
docs
32+
3233
[testenv:release-check]
3334
description = ensure that the distribution is ready to release
3435
basepython = python3
@@ -39,9 +40,10 @@ deps =
3940
check-manifest
4041
check-python-versions >= 0.20.0
4142
wheel
43+
commands_pre =
4244
commands =
4345
check-manifest
44-
check-python-versions
46+
check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml
4547
python -m build --sdist --no-isolation
4648
twine check dist/*
4749

@@ -83,7 +85,7 @@ commands =
8385
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
8486
coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
8587
coverage html --ignore-errors
86-
coverage report --ignore-errors --show-missing --fail-under=97
88+
coverage report --show-missing --fail-under=97
8789

8890
[coverage:run]
8991
branch = True
@@ -95,6 +97,7 @@ omit =
9597

9698
[coverage:report]
9799
precision = 2
100+
ignore_errors = True
98101
exclude_lines =
99102
pragma: no cover
100103
pragma: nocover

0 commit comments

Comments
 (0)