diff --git a/python-zope.exceptions.changes b/python-zope.exceptions.changes index 4fc4a12..46b09f4 100644 --- a/python-zope.exceptions.changes +++ b/python-zope.exceptions.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Dec 19 15:29:01 UTC 2021 - Ben Greiner + +- Add zope.exceptions-pr19+pr21-py310.patch + * gh#zopefoundation/zope.exceptions#21 + ------------------------------------------------------------------- Tue Jul 21 09:01:45 UTC 2020 - Marketa Calabkova diff --git a/python-zope.exceptions.spec b/python-zope.exceptions.spec index 1a5a927..e08779a 100644 --- a/python-zope.exceptions.spec +++ b/python-zope.exceptions.spec @@ -1,7 +1,7 @@ # -# spec file for package python-zope.exceptions +# spec file # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,6 +33,8 @@ License: ZPL-2.1 Group: Development/Languages/Python URL: http://cheeseshop.python.org/pypi/zope.exceptions Source: https://files.pythonhosted.org/packages/source/z/zope.exceptions/zope.exceptions-%{version}.tar.gz +# PATCH-FIX-UPSTREAM zope.exceptions-pr19+pr21-py310.patch -- gh#zopefoundation/zope.exceptions#21 +Patch0: zope.exceptions-pr19+pr21-py310.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -52,7 +54,7 @@ This package contains exception interfaces and implementations which are so general purpose that they don't belong in Zope application-specific packages. %prep -%setup -q -n zope.exceptions-%{version} +%autosetup -p1 -n zope.exceptions-%{version} %build %python_build @@ -72,7 +74,10 @@ general purpose that they don't belong in Zope application-specific packages. %files %{python_files} %license LICENSE.txt %doc CHANGES.rst COPYRIGHT.txt README.rst -%{python_sitelib}/* +%dir %{python_sitelib}/zope/ +%{python_sitelib}/zope/exceptions +%{python_sitelib}/zope.exceptions-%{version}*-info +%{python_sitelib}/zope.exceptions-%{version}*-nspkg.pth %endif %changelog diff --git a/zope.exceptions-pr19+pr21-py310.patch b/zope.exceptions-pr19+pr21-py310.patch new file mode 100644 index 0000000..19b63da --- /dev/null +++ b/zope.exceptions-pr19+pr21-py310.patch @@ -0,0 +1,26 @@ +From 71be9d0724f087c99857edeef514d0b99e429cc9 Mon Sep 17 00:00:00 2001 +From: Zamarin Arthur +Date: Mon, 31 May 2021 12:14:30 +0300 +Subject: [PATCH 1/2] Adapt to python 3.10 SyntaxError messages + +Signed-off-by: Zamarin Arthur +--- + src/zope/exceptions/tests/test_exceptionformatter.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: zope.exceptions-4.4/src/zope/exceptions/tests/test_exceptionformatter.py +=================================================================== +--- zope.exceptions-4.4.orig/src/zope/exceptions/tests/test_exceptionformatter.py ++++ zope.exceptions-4.4/src/zope/exceptions/tests/test_exceptionformatter.py +@@ -666,9 +666,8 @@ class Test_format_exception(unittest.Tes + s = self._callFUT(False) + lines = s.splitlines()[-3:] + self.assertEqual(lines[0], ' syntax error') +- # PyPy has a shorter prefix +- self.assertTrue(lines[1].endswith(' ^')) +- self.assertEqual(lines[2], 'SyntaxError: invalid syntax') ++ self.assertIn(' ^', lines[1]) ++ self.assertTrue(lines[2].startswith('SyntaxError: invalid syntax'), lines[2]) + + def test_traceback_info_non_ascii(self): + __traceback_info__ = u"Have a Snowman: \u2603"