public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/zope-exceptions/, dev-python/zope-exceptions/files/
@ 2021-05-31 12:09 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2021-05-31 12:09 UTC (permalink / raw
  To: gentoo-commits

commit:     f2cf7a0ba34c05cb2840f2629876da3377ea3cac
Author:     Zamarin Arthur <arthurzam <AT> gmail <DOT> com>
AuthorDate: Mon May 31 09:19:00 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May 31 12:08:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2cf7a0b

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 <AT> gmail.com>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../zope-exceptions-4.4-fix-test-py3.10.patch      | 23 ++++++++++++++++++++++
 .../zope-exceptions/zope-exceptions-4.4.ebuild     |  9 ++++++---
 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 00000000000..a218797b25a
--- /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 61b483dc978..e3e9b985874 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
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-31 12:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 12:09 [gentoo-commits] repo/gentoo:master commit in: dev-python/zope-exceptions/, dev-python/zope-exceptions/files/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox