Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.10"]

steps:
- uses: actions/checkout@v5
Expand Down
10 changes: 10 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ testtools NEWS

Changes and improvements to testtools_, grouped by release.

NEXT
~~~~

Changes
-------

* Drop support for Python 3.9. (Jelmer Vernooij)

* Add support for Python 3.13 and 3.14. (Jelmer Vernooij)

2.8.0
~~~~~

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ under the same license as Python, see LICENSE for details.
Supported platforms
-------------------

* Python 3.9+ or PyPy3
* Python 3.10+ or PyPy3

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

Expand Down
2 changes: 1 addition & 1 deletion doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Cross-Python compatibility
--------------------------

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

If you wish to use testtools with Python 2.4 or 2.5, then please use testtools
0.9.15.
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand All @@ -26,7 +27,7 @@ classifiers = [
"Topic :: Software Development :: Testing",
]
dynamic = ["version"]
requires-python = ">=3.9"
requires-python = ">=3.10"

[project.urls]
Homepage = "https://github.com/testing-cabal/testtools"
Expand Down
1 change: 0 additions & 1 deletion testtools/testresult/real.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def startTestRun(self):
self.unexpectedSuccesses = []
self.failfast = failfast
# -- End: As per python 2.7 --
# -- Python 3.5
self.tb_locals = tb_locals
# -- Python 3.12
self.collectedDurations = []
Expand Down
8 changes: 3 additions & 5 deletions testtools/tests/test_testresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -3053,11 +3053,9 @@ def test_syntax_error(self):
"""Syntax errors should still have fancy special-case formatting"""
if platform.python_implementation() == "PyPy":
spaces = " "
elif sys.version_info >= (3, 10):
spaces = " "
else:
spaces = " "
marker = "^^^" if sys.version_info >= (3, 10) else "^"
spaces = " "
marker = "^^^"
textoutput = self._test_external_case("exec ('f(a, b c)')")
self.assertIn(
self._as_output(
Expand Down Expand Up @@ -3143,7 +3141,7 @@ def test_syntax_error_line_utf_8(self):
textoutput = self._setup_external_case("import bad")
self._write_module("bad", "utf-8", f"\ufeff^ = 0 # {text}\n")
textoutput = self._run_external_case()
# Python 3.9 no longer prints the '\ufeff'
# Python no longer prints the '\ufeff'
textoutput = textoutput.replace("\ufeff", "")
self.assertThat(
textoutput,
Expand Down
4 changes: 2 additions & 2 deletions testtools/twistedsupport/_spinner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]

import signal
from typing import ClassVar, Union
from typing import ClassVar

from fixtures import Fixture
from twisted.internet import defer
Expand Down Expand Up @@ -159,7 +159,7 @@ class Spinner:
# the ideal, and it actually works for many cases.
_OBLIGATORY_REACTOR_ITERATIONS = 0

_failure: Union[Failure, object]
_failure: Failure | object

def __init__(self, reactor, debug=False):
"""Construct a Spinner.
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py39,py310,py311,py312,py313,pypy3
envlist = py310,py311,py312,py313,py314,pypy3
minversion = 4.2

[testenv]
Expand Down