commit: 4d7aeaa0940ae4fa1c47a760f2d07418c3364dd9 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Mar 17 12:54:58 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Mar 17 12:56:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d7aeaa0
dev-python/pyspf: Enable py3.13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/pyspf/files/pyspf-2.0.14-py313.patch | 23 +++++++++++++++++++++++ dev-python/pyspf/pyspf-2.0.14-r3.ebuild | 9 +++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/dev-python/pyspf/files/pyspf-2.0.14-py313.patch b/dev-python/pyspf/files/pyspf-2.0.14-py313.patch new file mode 100644 index 000000000000..d6f71759fa49 --- /dev/null +++ b/dev-python/pyspf/files/pyspf-2.0.14-py313.patch @@ -0,0 +1,23 @@ +From 7c92c9db299a466aad981dd747bbfd2a57db6827 Mon Sep 17 00:00:00 2001 +From: Colin Watson <[email protected]> +Date: Sun, 12 Jan 2025 15:40:39 +0000 +Subject: [PATCH] Fix doctest registration for Python 3.13 + +`unittest.makeSuite` was deprecated in Python 3.11 and removed in 3.13. +--- + test/testspf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/testspf.py b/test/testspf.py +index eb8d933..beac450 100644 +--- a/test/testspf.py ++++ b/test/testspf.py +@@ -225,7 +225,7 @@ def makeSuite(filename): + return suite + + def docsuite(): +- suite = unittest.makeSuite(SPFTestCases,'test') ++ suite = unittest.defaultTestLoader.loadTestsFromTestCase(SPFTestCases) + try: + import authres + except: diff --git a/dev-python/pyspf/pyspf-2.0.14-r3.ebuild b/dev-python/pyspf/pyspf-2.0.14-r3.ebuild index 1b466cea4b4c..b22628d6fc11 100644 --- a/dev-python/pyspf/pyspf-2.0.14-r3.ebuild +++ b/dev-python/pyspf/pyspf-2.0.14-r3.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) PYTHON_REQ_USE="ipv6(+)" inherit distutils-r1 pypi @@ -33,6 +33,11 @@ BDEPEND=" ) " +PATCHES=( + # https://github.com/sdgathman/pyspf/pull/42 + "${FILESDIR}/${P}-py313.patch" +) + python_test() { cd test || die "${EPYTHON}" testspf.py || die "Test fail with ${EPYTHON}"
