summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZamarin Arthur <arthurzam@gmail.com>2021-05-31 12:19:00 +0300
committerMichał Górny <mgorny@gentoo.org>2021-05-31 14:08:40 +0200
commitf2cf7a0ba34c05cb2840f2629876da3377ea3cac (patch)
treec3d08e88be97c8c89f5fdfff0008219333bf1dc3
parentdev-python/zope-schema: drop 6.0.0, 6.0.1 (diff)
downloadgentoo-f2cf7a0b.tar.gz
gentoo-f2cf7a0b.tar.bz2
gentoo-f2cf7a0b.zip
dev-python/zope-exceptions: bump to python 3.10
fix tests for python3.10 (PR sent upstream) passes tests Signed-off-by: Zamarin Arthur <arthurzam@gmail.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/zope-exceptions/files/zope-exceptions-4.4-fix-test-py3.10.patch23
-rw-r--r--dev-python/zope-exceptions/zope-exceptions-4.4.ebuild9
2 files changed, 29 insertions, 3 deletions
diff --git a/dev-python/zope-exceptions/files/zope-exceptions-4.4-fix-test-py3.10.patch b/dev-python/zope-exceptions/files/zope-exceptions-4.4-fix-test-py3.10.patch
new file mode 100644
index 000000000000..a218797b25a2
--- /dev/null
+++ b/dev-python/zope-exceptions/files/zope-exceptions-4.4-fix-test-py3.10.patch
@@ -0,0 +1,23 @@
+From 71be9d0724f087c99857edeef514d0b99e429cc9 Mon Sep 17 00:00:00 2001
+From: Zamarin Arthur <arthurzam@gmail.com>
+Date: Mon, 31 May 2021 12:14:30 +0300
+Subject: [PATCH] Adapt to python 3.10 SyntaxError messages
+
+Signed-off-by: Zamarin Arthur <arthurzam@gmail.com>
+---
+ src/zope/exceptions/tests/test_exceptionformatter.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/zope/exceptions/tests/test_exceptionformatter.py b/src/zope/exceptions/tests/test_exceptionformatter.py
+index 64729b1..0f5ee8c 100644
+--- a/src/zope/exceptions/tests/test_exceptionformatter.py
++++ b/src/zope/exceptions/tests/test_exceptionformatter.py
+@@ -668,7 +668,7 @@ def test_multiline_exception(self):
+ self.assertEqual(lines[0], ' syntax error')
+ # PyPy has a shorter prefix
+ self.assertTrue(lines[1].endswith(' ^'))
+- self.assertEqual(lines[2], 'SyntaxError: invalid syntax')
++ self.assertRegex(lines[2], '^SyntaxError: invalid syntax')
+
+ def test_traceback_info_non_ascii(self):
+ __traceback_info__ = u"Have a Snowman: \u2603"
diff --git a/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild b/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild
index 61b483dc978a..e3e9b985874f 100644
--- a/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild
+++ b/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{7..9} pypy3 )
+PYTHON_COMPAT=( python3_{7..10} pypy3 )
inherit distutils-r1
@@ -14,6 +14,7 @@ MY_P=${MY_PN}-${PV}
DESCRIPTION="General purpose exceptions for Zope packages"
HOMEPAGE="https://pypi.org/project/zope.exceptions/ https://github.com/zopefoundation/zope.exceptions"
SRC_URI="mirror://pypi/${MY_PN::1}/${MY_PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="ZPL"
SLOT="0"
@@ -23,7 +24,9 @@ RDEPEND="dev-python/namespace-zope[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]"
BDEPEND="test? ( dev-python/zope-testrunner[${PYTHON_USEDEP}] )"
-S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-test-py3.10.patch"
+)
distutils_enable_tests setup.py