dev-python/zope-exceptions: Enable py3.13

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2024-06-18 17:21:50 +02:00
parent ec77e0931c
commit 2d5675d346
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,24 @@
diff --git a/src/zope/exceptions/tests/test_exceptionformatter.py b/src/zope/exceptions/tests/test_exceptionformatter.py
index 92ea79a..0e18d8d 100644
--- a/src/zope/exceptions/tests/test_exceptionformatter.py
+++ b/src/zope/exceptions/tests/test_exceptionformatter.py
@@ -24,6 +24,7 @@ from urllib.error import HTTPError
IS_PY39_OR_GREATER = sys.version_info >= (3, 9)
+IS_PY313_OR_GREATER = sys.version_info >= (3, 13)
class TextExceptionFormatterTests(unittest.TestCase):
@@ -763,8 +764,10 @@ class Test_format_exception(unittest.TestCase):
</ul><p> File "&lt;string&gt;", line 1<br />
import<br />
^<br />
- SyntaxError: invalid syntax<br />
+ SyntaxError: {error}<br />
</p>""").format(
+ error="Expected one or more names after 'import'"
+ if IS_PY313_OR_GREATER else 'invalid syntax',
module='zope.exceptions.tests.test_exceptionformatter',
fn='test_format_exception_as_html',
)

View File

@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1 pypi
@ -28,6 +28,11 @@ RDEPEND="
distutils_enable_tests unittest
src_prepare() {
local PATCHES=(
# https://github.com/zopefoundation/zope.exceptions/issues/34
"${FILESDIR}/${P}-py313.patch"
)
# strip rdep specific to namespaces
sed -i -e "/'setuptools'/d" setup.py || die
distutils-r1_src_prepare