Version 5.1 (rhbz#2290844)

- Add patch for python 3.13 compatibility (rhbz#2280553)
- Minor spec file cleanups
epel10
Jerry James 7 months ago
parent 81edd92227
commit 06d59ea1de

1
.gitignore vendored

@ -5,3 +5,4 @@
/zope.exceptions-4.0.7.tar.gz
/zope.exceptions-4.0.8.tar.gz
/zope.exceptions-5.0.1.tar.gz
/zope.exceptions-5.1.tar.gz

@ -0,0 +1,34 @@
From 92b73e0f3db76c4f7251f9703a306846e7dc4462 Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry@gmail.com>
Date: Tue, 23 Jul 2024 09:44:34 -0600
Subject: [PATCH] Fix test_format_exception_as_html on python 3.13
---
src/zope/exceptions/tests/test_exceptionformatter.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/zope/exceptions/tests/test_exceptionformatter.py b/src/zope/exceptions/tests/test_exceptionformatter.py
index 92ea79a..1a37538 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):
@@ -772,6 +773,9 @@ class Test_format_exception(unittest.TestCase):
# Python 3.9 moves the pointer after the statement instead to the
# last character of it:
expected = expected.replace('^<br />', ' ^<br />')
+ if IS_PY313_OR_GREATER: # pragma: no cover
+ # Python 3.13 changed the text of the SyntaxError
+ expected = expected.replace("invalid syntax", "Expected one or more names after 'import'")
# HTML formatter uses Windows line endings for some reason.
result = result.replace('\r\n', '\n')
result = re.sub(r'line \d\d\d,', 'line ABC,', result)
--
2.45.2

@ -1,15 +1,24 @@
%global modname zope.exceptions
%global giturl https://github.com/zopefoundation/zope.exceptions
# There is a test dependency loop, so we need a way to build this without tests
# zope.exceptions -> zope.testrunner-> zope.exceptions
%bcond tests 1
Summary: Zope Exceptions
Name: python-zope-exceptions
Version: 5.0.1
Release: 4%{?dist}
VCS: https://github.com/zopefoundation/zope.exceptions
Source0: %{VCS}/archive/%{version}/%{modname}-%{version}.tar.gz
Version: 5.1
Release: 1%{?dist}
VCS: git:%{giturl}.git
Source0: %{giturl}/archive/%{version}/%{modname}-%{version}.tar.gz
License: ZPL-2.1
BuildArch: noarch
URL: https://zopeexceptions.readthedocs.io/
# Fix FTBFS with python3.13
# https://github.com/zopefoundation/zope.exceptions/pull/35
Patch: 0001-Fix-test_format_exception_as_html-on-python-3.13.patch
%description
This package contains exception interfaces and implementations which are so
general purpose that they don't belong in Zope application-specific packages.
@ -18,16 +27,12 @@ general purpose that they don't belong in Zope application-specific packages.
Summary: Zope Exceptions
BuildRequires: python3-devel
# There is a test dependency loop, so we need a way to build this without tests
# zope.exceptions -> zope.testrunner-> zope.exceptions
%bcond tests 1
%description -n python3-zope-exceptions
This package contains exception interfaces and implementations which are so
general purpose that they don't belong in Zope application-specific packages.
%prep
%autosetup -n %{modname}-%{version}
%autosetup -n %{modname}-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires %{?with_tests:-t}
@ -51,6 +56,11 @@ general purpose that they don't belong in Zope application-specific packages.
%{python3_sitelib}/%{modname}-*-nspkg.pth
%changelog
* Tue Jul 23 2024 Jerry James <loganjerry@gmail.com> - 5.1-1
- Version 5.1 (rhbz#2290844)
- Add patch for python 3.13 compatibility (rhbz#2280553)
- Minor spec file cleanups
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

@ -1 +1 @@
SHA512 (zope.exceptions-5.0.1.tar.gz) = 1b599b4e4cd3d3e3a9a1dd793d912d2ab860be4167f16cdbef092319fd46105401db8b16e04aacb18299da5d795fcbad488ce644f184b3336e8ffcf7f2306bc4
SHA512 (zope.exceptions-5.1.tar.gz) = 4db86436a8d1f446715fb862629978f41e666baeb62e8eb7a867f59b2d2d0aa8e49b561e6ebb277c6eb004db31aa11b49e5e76a2862a980f2ff6b839f7065f6c

Loading…
Cancel
Save