diff --git a/dev-python/testfixtures/files/testfixtures-12.3.0-py3.15.patch b/dev-python/testfixtures/files/testfixtures-12.3.0-py3.15.patch new file mode 100644 index 0000000000000..387c07ea59897 --- /dev/null +++ b/dev-python/testfixtures/files/testfixtures-12.3.0-py3.15.patch @@ -0,0 +1,36 @@ +https://github.com/simplistix/testfixtures/pull/258 + +From 7c8dce6247d781c8fa8408e4078605df5c231796 Mon Sep 17 00:00:00 2001 +From: Alfred Wingate +Date: Sun, 19 Jul 2026 14:52:17 +0300 +Subject: [PATCH] Fix tests with Python 3.15 + +See-Also: https://github.com/python/cpython/pull/149298 +Signed-off-by: Alfred Wingate +--- + tests/test_shouldwarn.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/test_shouldwarn.py b/tests/test_shouldwarn.py +index a1d31b0..e4411f1 100644 +--- a/tests/test_shouldwarn.py ++++ b/tests/test_shouldwarn.py +@@ -1,5 +1,6 @@ + from unittest import TestCase + ++import sys + import warnings + + from testfixtures import ( +@@ -147,6 +148,8 @@ class ShouldWarnTests(TestCase): + message=C(DeprecationWarning('foo')), + source=None + ) ++ if sys.version_info >= (3, 15): ++ expected_attrs['module']='bar_module' + + compare(expected=C(warnings.WarningMessage, **expected_attrs), + actual=recorded[0]) +-- +2.55.0 + diff --git a/dev-python/testfixtures/testfixtures-12.3.0.ebuild b/dev-python/testfixtures/testfixtures-12.3.0.ebuild index 166f504bce6a0..71efc9a83e8a2 100644 --- a/dev-python/testfixtures/testfixtures-12.3.0.ebuild +++ b/dev-python/testfixtures/testfixtures-12.3.0.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_USE_PEP517=hatchling PYPI_VERIFY_REPO=https://github.com/simplistix/testfixtures -PYTHON_COMPAT=( python3_{12..14} ) +PYTHON_COMPAT=( python3_{12..15} ) inherit distutils-r1 pypi @@ -37,6 +37,10 @@ BDEPEND=" EPYTEST_PLUGINS=( pytest-django ) distutils_enable_tests pytest +PATCHES=( + "${FILESDIR}"/testfixtures-12.3.0-py3.15.patch +) + python_test() { local -x PYTHONPATH="." local -x DJANGO_SETTINGS_MODULE=tests.test_django.settings