Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/zope-exceptions/, dev-python/zope-exceptions/files/
Date: Mon, 31 May 2021 12:09:49
Message-Id: 1622462920.f2cf7a0ba34c05cb2840f2629876da3377ea3cac.mgorny@gentoo
1 commit: f2cf7a0ba34c05cb2840f2629876da3377ea3cac
2 Author: Zamarin Arthur <arthurzam <AT> gmail <DOT> com>
3 AuthorDate: Mon May 31 09:19:00 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 31 12:08:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2cf7a0b
7
8 dev-python/zope-exceptions: bump to python 3.10
9
10 fix tests for python3.10 (PR sent upstream)
11 passes tests
12
13 Signed-off-by: Zamarin Arthur <arthurzam <AT> gmail.com>
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 .../zope-exceptions-4.4-fix-test-py3.10.patch | 23 ++++++++++++++++++++++
17 .../zope-exceptions/zope-exceptions-4.4.ebuild | 9 ++++++---
18 2 files changed, 29 insertions(+), 3 deletions(-)
19
20 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
21 new file mode 100644
22 index 00000000000..a218797b25a
23 --- /dev/null
24 +++ b/dev-python/zope-exceptions/files/zope-exceptions-4.4-fix-test-py3.10.patch
25 @@ -0,0 +1,23 @@
26 +From 71be9d0724f087c99857edeef514d0b99e429cc9 Mon Sep 17 00:00:00 2001
27 +From: Zamarin Arthur <arthurzam@×××××.com>
28 +Date: Mon, 31 May 2021 12:14:30 +0300
29 +Subject: [PATCH] Adapt to python 3.10 SyntaxError messages
30 +
31 +Signed-off-by: Zamarin Arthur <arthurzam@×××××.com>
32 +---
33 + src/zope/exceptions/tests/test_exceptionformatter.py | 2 +-
34 + 1 file changed, 1 insertion(+), 1 deletion(-)
35 +
36 +diff --git a/src/zope/exceptions/tests/test_exceptionformatter.py b/src/zope/exceptions/tests/test_exceptionformatter.py
37 +index 64729b1..0f5ee8c 100644
38 +--- a/src/zope/exceptions/tests/test_exceptionformatter.py
39 ++++ b/src/zope/exceptions/tests/test_exceptionformatter.py
40 +@@ -668,7 +668,7 @@ def test_multiline_exception(self):
41 + self.assertEqual(lines[0], ' syntax error')
42 + # PyPy has a shorter prefix
43 + self.assertTrue(lines[1].endswith(' ^'))
44 +- self.assertEqual(lines[2], 'SyntaxError: invalid syntax')
45 ++ self.assertRegex(lines[2], '^SyntaxError: invalid syntax')
46 +
47 + def test_traceback_info_non_ascii(self):
48 + __traceback_info__ = u"Have a Snowman: \u2603"
49
50 diff --git a/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild b/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild
51 index 61b483dc978..e3e9b985874 100644
52 --- a/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild
53 +++ b/dev-python/zope-exceptions/zope-exceptions-4.4.ebuild
54 @@ -1,10 +1,10 @@
55 -# Copyright 1999-2020 Gentoo Authors
56 +# Copyright 1999-2021 Gentoo Authors
57 # Distributed under the terms of the GNU General Public License v2
58
59 EAPI=7
60
61 DISTUTILS_USE_SETUPTOOLS=rdepend
62 -PYTHON_COMPAT=( python3_{7..9} pypy3 )
63 +PYTHON_COMPAT=( python3_{7..10} pypy3 )
64
65 inherit distutils-r1
66
67 @@ -14,6 +14,7 @@ MY_P=${MY_PN}-${PV}
68 DESCRIPTION="General purpose exceptions for Zope packages"
69 HOMEPAGE="https://pypi.org/project/zope.exceptions/ https://github.com/zopefoundation/zope.exceptions"
70 SRC_URI="mirror://pypi/${MY_PN::1}/${MY_PN}/${MY_P}.tar.gz"
71 +S="${WORKDIR}/${MY_P}"
72
73 LICENSE="ZPL"
74 SLOT="0"
75 @@ -23,7 +24,9 @@ RDEPEND="dev-python/namespace-zope[${PYTHON_USEDEP}]
76 dev-python/zope-interface[${PYTHON_USEDEP}]"
77 BDEPEND="test? ( dev-python/zope-testrunner[${PYTHON_USEDEP}] )"
78
79 -S="${WORKDIR}/${MY_P}"
80 +PATCHES=(
81 + "${FILESDIR}/${P}-fix-test-py3.10.patch"
82 +)
83
84 distutils_enable_tests setup.py