Skip to content

Commit fbe5839

Browse files
authored
Merge pull request #476 from testing-cabal/python3.14
Drop Python 3.9 support and add Python 3.13 and 3.14 support.
2 parents c24c422 + e272cbd commit fbe5839

File tree

9 files changed

+22
-14
lines changed

9 files changed

+22
-14
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
11+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.10"]
1212

1313
steps:
1414
- uses: actions/checkout@v5

NEWS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ testtools NEWS
33

44
Changes and improvements to testtools_, grouped by release.
55

6+
NEXT
7+
~~~~
8+
9+
Changes
10+
-------
11+
12+
* Drop support for Python 3.9. (Jelmer Vernooij)
13+
14+
* Add support for Python 3.13 and 3.14. (Jelmer Vernooij)
15+
616
2.8.0
717
~~~~~
818

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ under the same license as Python, see LICENSE for details.
3434
Supported platforms
3535
-------------------
3636

37-
* Python 3.9+ or PyPy3
37+
* Python 3.10+ or PyPy3
3838

3939
If you would like to use testtools for earlier Pythons, consult the compatibility docs:
4040

doc/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Cross-Python compatibility
8484
--------------------------
8585

8686
testtools gives you the very latest in unit testing technology in a way that
87-
will work with Python 3.9+ and PyPy3.
87+
will work with Python 3.10+ and PyPy3.
8888

8989
If you wish to use testtools with Python 2.4 or 2.5, then please use testtools
9090
0.9.15.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ classifiers = [
1414
"Operating System :: OS Independent",
1515
"Programming Language :: Python",
1616
"Programming Language :: Python :: 3",
17-
"Programming Language :: Python :: 3.9",
1817
"Programming Language :: Python :: 3.10",
1918
"Programming Language :: Python :: 3.11",
2019
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
21+
"Programming Language :: Python :: 3.14",
2122
"Programming Language :: Python :: 3 :: Only",
2223
"Programming Language :: Python :: Implementation :: CPython",
2324
"Programming Language :: Python :: Implementation :: PyPy",
@@ -26,7 +27,7 @@ classifiers = [
2627
"Topic :: Software Development :: Testing",
2728
]
2829
dynamic = ["version"]
29-
requires-python = ">=3.9"
30+
requires-python = ">=3.10"
3031

3132
[project.urls]
3233
Homepage = "https://github.com/testing-cabal/testtools"

testtools/testresult/real.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ def startTestRun(self):
221221
self.unexpectedSuccesses = []
222222
self.failfast = failfast
223223
# -- End: As per python 2.7 --
224-
# -- Python 3.5
225224
self.tb_locals = tb_locals
226225
# -- Python 3.12
227226
self.collectedDurations = []

testtools/tests/test_testresult.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,11 +3053,9 @@ def test_syntax_error(self):
30533053
"""Syntax errors should still have fancy special-case formatting"""
30543054
if platform.python_implementation() == "PyPy":
30553055
spaces = " "
3056-
elif sys.version_info >= (3, 10):
3057-
spaces = " "
30583056
else:
3059-
spaces = " "
3060-
marker = "^^^" if sys.version_info >= (3, 10) else "^"
3057+
spaces = " "
3058+
marker = "^^^"
30613059
textoutput = self._test_external_case("exec ('f(a, b c)')")
30623060
self.assertIn(
30633061
self._as_output(
@@ -3143,7 +3141,7 @@ def test_syntax_error_line_utf_8(self):
31433141
textoutput = self._setup_external_case("import bad")
31443142
self._write_module("bad", "utf-8", f"\ufeff^ = 0 # {text}\n")
31453143
textoutput = self._run_external_case()
3146-
# Python 3.9 no longer prints the '\ufeff'
3144+
# Python no longer prints the '\ufeff'
31473145
textoutput = textoutput.replace("\ufeff", "")
31483146
self.assertThat(
31493147
textoutput,

testtools/twistedsupport/_spinner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818

1919
import signal
20-
from typing import ClassVar, Union
20+
from typing import ClassVar
2121

2222
from fixtures import Fixture
2323
from twisted.internet import defer
@@ -159,7 +159,7 @@ class Spinner:
159159
# the ideal, and it actually works for many cases.
160160
_OBLIGATORY_REACTOR_ITERATIONS = 0
161161

162-
_failure: Union[Failure, object]
162+
_failure: Failure | object
163163

164164
def __init__(self, reactor, debug=False):
165165
"""Construct a Spinner.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py39,py310,py311,py312,py313,pypy3
2+
envlist = py310,py311,py312,py313,py314,pypy3
33
minversion = 4.2
44

55
[testenv]

0 commit comments

Comments
 (0)