mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
dev-python/zope-exceptions: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
ec77e0931c
commit
2d5675d346
@ -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 "<string>", 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',
|
||||
)
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user