- Add patch for python 3.13 compatibility (rhbz#2280553) - Minor spec file cleanupsepel10
parent
81edd92227
commit
06d59ea1de
@ -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 +1 @@
|
||||
SHA512 (zope.exceptions-5.0.1.tar.gz) = 1b599b4e4cd3d3e3a9a1dd793d912d2ab860be4167f16cdbef092319fd46105401db8b16e04aacb18299da5d795fcbad488ce644f184b3336e8ffcf7f2306bc4
|
||||
SHA512 (zope.exceptions-5.1.tar.gz) = 4db86436a8d1f446715fb862629978f41e666baeb62e8eb7a867f59b2d2d0aa8e49b561e6ebb277c6eb004db31aa11b49e5e76a2862a980f2ff6b839f7065f6c
|
||||
|
Loading…
Reference in new issue