diff options
| -rw-r--r-- | dev-python/zope-exceptions/files/zope-exceptions-5.1-py313.patch | 24 | ||||
| -rw-r--r-- | dev-python/zope-exceptions/zope-exceptions-5.1.ebuild | 7 |
2 files changed, 30 insertions, 1 deletions
diff --git a/dev-python/zope-exceptions/files/zope-exceptions-5.1-py313.patch b/dev-python/zope-exceptions/files/zope-exceptions-5.1-py313.patch new file mode 100644 index 000000000000..623b53b32376 --- /dev/null +++ b/dev-python/zope-exceptions/files/zope-exceptions-5.1-py313.patch @@ -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', + ) diff --git a/dev-python/zope-exceptions/zope-exceptions-5.1.ebuild b/dev-python/zope-exceptions/zope-exceptions-5.1.ebuild index 7bf7eb05d7af..956910d21e15 100644 --- a/dev-python/zope-exceptions/zope-exceptions-5.1.ebuild +++ b/dev-python/zope-exceptions/zope-exceptions-5.1.ebuild @@ -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 |
