Skip to content

Commit da45255

Browse files
committed
refactor: drop Python 3.8
1 parent a8e36de commit da45255

File tree

14 files changed

+26
-54
lines changed

14 files changed

+26
-54
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,15 @@ jobs:
4545
# tox.ini so that tox will run properly. PYVERSIONS
4646
# Available versions:
4747
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
48-
- "3.8"
4948
- "3.9"
5049
- "3.10"
5150
- "3.11"
5251
- "3.12"
5352
- "3.13"
54-
- "pypy-3.8"
5553
- "pypy-3.9"
5654
- "pypy-3.10"
5755
exclude:
5856
# Mac PyPy always takes the longest, and doesn't add anything.
59-
- os: macos
60-
python-version: "pypy-3.8"
6157
- os: macos
6258
python-version: "pypy-3.9"
6359
- os: macos
@@ -146,7 +142,7 @@ jobs:
146142
- name: "Set up Python"
147143
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
148144
with:
149-
python-version: "3.8" # Minimum of PYVERSIONS
145+
python-version: "3.9" # Minimum of PYVERSIONS
150146
# At a certain point, installing dependencies failed on pypy 3.9 and
151147
# 3.10 on Windows. Commenting out the cache here fixed it. Someday
152148
# try using the cache again.

.github/workflows/kit.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
# }
8080
# # PYVERSIONS. Available versions: https://pypi.org/project/cibuildwheel/
8181
# # PyPy versions are handled further below in the "pypy" step.
82-
# pys = ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313"]
82+
# pys = ["cp39", "cp310", "cp311", "cp312", "cp313"]
8383
#
8484
# # Some OS/arch combinations need overrides for the Python versions:
8585
# os_arch_pys = {
@@ -156,11 +156,11 @@ jobs:
156156
- name: "Check out the repo"
157157
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
158158

159-
- name: "Install Python 3.8"
159+
- name: "Install Python"
160160
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
161161
with:
162162
# PYVERSIONS
163-
python-version: "3.8"
163+
python-version: "3.9"
164164
cache: pip
165165
cache-dependency-path: 'requirements/*.pip'
166166

@@ -201,11 +201,11 @@ jobs:
201201
- name: "Check out the repo"
202202
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
203203

204-
- name: "Install Python 3.8"
204+
- name: "Install Python"
205205
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
206206
with:
207207
# PYVERSIONS
208-
python-version: "3.8"
208+
python-version: "3.9"
209209
cache: pip
210210
cache-dependency-path: 'requirements/*.pip'
211211

@@ -242,7 +242,7 @@ jobs:
242242
- name: "Install PyPy"
243243
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
244244
with:
245-
python-version: "pypy-3.8" # Minimum of PyPy PYVERSIONS
245+
python-version: "pypy-3.9" # Minimum of PyPy PYVERSIONS
246246
cache: pip
247247
cache-dependency-path: 'requirements/*.pip'
248248

@@ -256,7 +256,7 @@ jobs:
256256
run: |
257257
# One wheel works for all PyPy versions. PYVERSIONS
258258
# yes, this is weird syntax: https://github.com/pypa/build/issues/202
259-
echo -e "[bdist_wheel]\npython_tag=pp38.pp39.pp310" > $DIST_EXTRA_CONFIG
259+
echo -e "[bdist_wheel]\npython_tag=pp39.pp310" > $DIST_EXTRA_CONFIG
260260
pypy3 -m build -w
261261
262262
- name: "List wheels"

.github/workflows/quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: "Install Python"
4343
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
4444
with:
45-
python-version: "3.8" # Minimum of PYVERSIONS
45+
python-version: "3.9" # Minimum of PYVERSIONS
4646
cache: pip
4747
cache-dependency-path: 'requirements/*.pip'
4848

@@ -65,7 +65,7 @@ jobs:
6565
- name: "Install Python"
6666
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
6767
with:
68-
python-version: "3.8" # Minimum of PYVERSIONS, but at least 3.8
68+
python-version: "3.9" # Minimum of PYVERSIONS
6969
cache: pip
7070
cache-dependency-path: 'requirements/*.pip'
7171

.github/workflows/testsuite.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ jobs:
4545
# Available versions:
4646
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
4747
# https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#available-versions-of-python-and-pypy
48-
- "3.8"
4948
- "3.9"
5049
- "3.10"
5150
- "3.11"
5251
- "3.12"
5352
- "3.13"
54-
- "pypy-3.8"
5553
- "pypy-3.9"
5654
- "pypy-3.10"
5755
exclude:

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Coverage.py runs on these versions of Python:
2525

2626
.. PYVERSIONS
2727
28-
* Python 3.8 through 3.12, and 3.13.0rc1, including free-threading.
29-
* PyPy3 versions 3.8 through 3.10.
28+
* Python 3.9 through 3.12, and 3.13.0rc2, including free-threading.
29+
* PyPy3 versions 3.9 and 3.10.
3030

3131
Documentation is on `Read the Docs`_. Code repository and issue tracker are on
3232
`GitHub`_.

coverage/env.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ class PYBEHAVIOR:
5353
# across versions.
5454
if pep626:
5555
optimize_if_not_debug = 1
56-
elif PYPY:
57-
if PYVERSION >= (3, 9):
58-
optimize_if_not_debug = 2
59-
else:
60-
optimize_if_not_debug = 3
6156
else:
6257
optimize_if_not_debug = 2
6358

@@ -67,14 +62,13 @@ class PYBEHAVIOR:
6762
# CPython 3.9a1 made sys.argv[0] and other reported files absolute paths.
6863
report_absolute_files = (
6964
(CPYTHON or (PYPY and PYPYVERSION >= (7, 3, 10)))
70-
and PYVERSION >= (3, 9)
7165
)
7266

7367
# Lines after break/continue/return/raise are no longer compiled into the
7468
# bytecode. They used to be marked as missing, now they aren't executable.
7569
omit_after_jump = (
7670
pep626
77-
or (PYPY and PYVERSION >= (3, 9) and PYPYVERSION >= (7, 3, 12))
71+
or (PYPY and PYPYVERSION >= (7, 3, 12))
7872
)
7973

8074
# PyPy has always omitted statements after return.

coverage/execfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,8 @@ def _prepare2(self) -> None:
145145
for ext in [".py", ".pyc", ".pyo"]:
146146
try_filename = os.path.join(self.arg0, "__main__" + ext)
147147
# 3.8.10 changed how files are reported when running a
148-
# directory. But I'm not sure how far this change is going to
149-
# spread, so I'll just hard-code it here for now.
150-
if env.PYVERSION >= (3, 8, 10):
151-
try_filename = os.path.abspath(try_filename)
148+
# directory.
149+
try_filename = os.path.abspath(try_filename)
152150
if os.path.exists(try_filename):
153151
self.arg0 = try_filename
154152
break

doc/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ these steps:
4949

5050
#. (Optional) Create a virtualenv to work in, and activate it. There
5151
are a number of ways to do this. Use the method you are comfortable with.
52-
Ideally, use Python3.8 (the lowest version coverage.py supports).
52+
Ideally, use Python 3.9 (the lowest version coverage.py supports).
5353

5454
#. Clone the repository::
5555

@@ -257,7 +257,7 @@ files. These are created by running ``make upgrade``.
257257

258258
.. minimum of PYVERSIONS:
259259
260-
It's important to use Python 3.8 to run ``make upgrade`` so that the pinned
260+
It's important to use Python 3.9 to run ``make upgrade`` so that the pinned
261261
versions will work on all of the Python versions currently supported by
262262
coverage.py.
263263

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ supported on:
1818

1919
.. PYVERSIONS
2020
21-
* Python 3.8 through 3.12, and 3.13.0rc1, including free-threading.
22-
* PyPy3 versions 3.8 through 3.10.
21+
* Python 3.9 through 3.12, and 3.13.0rc2, including free-threading.
22+
* PyPy3 versions 3.9 and 3.10.
2323

2424
.. ifconfig:: prerelease
2525

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
Operating System :: OS Independent
2424
Programming Language :: Python
2525
Programming Language :: Python :: 3
26-
Programming Language :: Python :: 3.8
2726
Programming Language :: Python :: 3.9
2827
Programming Language :: Python :: 3.10
2928
Programming Language :: Python :: 3.11
@@ -120,7 +119,7 @@
120119
"Mastodon": "https://hachyderm.io/@coveragepy",
121120
"Mastodon (nedbat)": "https://hachyderm.io/@nedbat",
122121
},
123-
python_requires=">=3.8", # minimum of PYVERSIONS
122+
python_requires=">=3.9", # minimum of PYVERSIONS
124123
)
125124

126125
# A replacement for the build_ext command which raises a single exception

tests/test_arcs.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,10 +1544,6 @@ def test_if_debug(self) -> None:
15441544
branchz_missing=branchz_missing,
15451545
)
15461546

1547-
@pytest.mark.xfail(
1548-
env.PYPY and env.PYVERSION[:2] == (3, 8) and env.PYPYVERSION >= (7, 3, 11),
1549-
reason="https://foss.heptapod.net/pypy/pypy/-/issues/3882",
1550-
)
15511547
def test_if_not_debug(self) -> None:
15521548
if env.PYBEHAVIOR.optimize_if_not_debug == 1:
15531549
branchz = "23 28 34 37"

tests/test_html.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,6 @@ def test_a(self) -> None:
806806
'<td class="right" data-ratio="2 3">67%</td>',
807807
)
808808

809-
@pytest.mark.skipif(
810-
env.PYPY and env.PYVERSION[:2] == (3, 8),
811-
reason="PyPy 3.8 produces different results!?",
812-
)
813809
def test_b_branch(self) -> None:
814810
self.make_file("b.py", """\
815811
def one(x):

tests/test_parser.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,6 @@ def g():
725725
assert parser.raw_statements == raw_statements
726726
assert parser.statements == set()
727727

728-
@pytest.mark.xfail(
729-
env.PYPY and env.PYVERSION[:2] == (3, 8),
730-
reason="AST doesn't mark end of classes correctly",
731-
)
732728
def test_class_decorator_pragmas(self) -> None:
733729
parser = self.parse_text("""\
734730
class Foo(object):

tox.ini

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[tox]
55
# When changing this list, be sure to check the [gh] list below.
66
# PYVERSIONS
7-
envlist = py3{8,9,10,11,12,13}, pypy3, doc, lint, mypy
7+
envlist = py3{9,10,11,12,13}, pypy3, doc, lint, mypy
88
skip_missing_interpreters = {env:COVERAGE_SKIP_MISSING_INTERPRETERS:True}
99
toxworkdir = {env:TOXWORKDIR:.tox}
1010

@@ -18,15 +18,15 @@ extras =
1818
deps =
1919
-r requirements/pip.pip
2020
-r requirements/pytest.pip
21-
py3{8,9,10,11}: -r requirements/light-threads.pip
21+
py3{9,10,11}: -r requirements/light-threads.pip
2222

2323
# Windows can't update the pip version with pip running, so use Python
2424
# to install things.
2525
install_command = python -m pip install -U {opts} {packages}
2626

2727
passenv = *
2828
setenv =
29-
pypy3{,8,9,10}: COVERAGE_TEST_CORES=pytrace
29+
pypy3{,9,10}: COVERAGE_TEST_CORES=pytrace
3030
# For some tests, we need .pyc files written in the current directory,
3131
# so override any local setting.
3232
PYTHONPYCACHEPREFIX=
@@ -84,7 +84,7 @@ commands =
8484

8585
[testenv:lint]
8686
# Minimum of PYVERSIONS
87-
basepython = python3.8
87+
basepython = python3.9
8888
deps =
8989
-r requirements/dev.pip
9090

@@ -105,7 +105,7 @@ commands =
105105
twine check dist/*
106106

107107
[testenv:mypy]
108-
basepython = python3.8
108+
basepython = python3.9
109109

110110
deps =
111111
-r requirements/mypy.pip
@@ -116,14 +116,13 @@ setenv =
116116

117117
commands =
118118
# PYVERSIONS
119-
mypy --python-version=3.8 --exclude=sysmon {env:TYPEABLE}
119+
mypy --python-version=3.9 --exclude=sysmon {env:TYPEABLE}
120120
mypy --python-version=3.12 {env:TYPEABLE}
121121

122122
[gh]
123123
# https://pypi.org/project/tox-gh/
124124
# PYVERSIONS
125125
python =
126-
3.8 = py38
127126
3.9 = py39
128127
3.10 = py310
129128
3.11 = py311

0 commit comments

Comments
 (0)