Backport patch to fix failing tests with Python 3.11
This commit is contained in:
parent
1dbaf4a5a5
commit
fdea196f39
38
9b8da4b1e2bdc025b643f2061aa32bf7ae0c78a8.patch
Normal file
38
9b8da4b1e2bdc025b643f2061aa32bf7ae0c78a8.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 9b8da4b1e2bdc025b643f2061aa32bf7ae0c78a8 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Bayer <mike_mp@zzzcomputing.com>
|
||||
Date: Sat, 9 Apr 2022 11:43:32 -0400
|
||||
Subject: [PATCH] reduce exception message tested for py311 compat
|
||||
|
||||
Change-Id: I519d4a840fd456ea042a5b0735da183a1e340aa4
|
||||
---
|
||||
test/test_exceptions.py | 10 ++--------
|
||||
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/test/test_exceptions.py b/test/test_exceptions.py
|
||||
index b1930c5..7a2e6b0 100644
|
||||
--- a/test/test_exceptions.py
|
||||
+++ b/test/test_exceptions.py
|
||||
@@ -274,10 +274,7 @@ def test_tback_no_trace_from_py_file(self):
|
||||
html_error = exceptions.html_error_template().render_unicode(
|
||||
error=v, traceback=None
|
||||
)
|
||||
- assert (
|
||||
- "local variable 'y' referenced before assignment"
|
||||
- in html_error
|
||||
- )
|
||||
+ assert "local variable 'y'" in html_error
|
||||
|
||||
def test_tback_trace_from_py_file(self):
|
||||
t = self._file_template("runtimeerr.html")
|
||||
@@ -287,10 +284,7 @@ def test_tback_trace_from_py_file(self):
|
||||
except:
|
||||
html_error = exceptions.html_error_template().render_unicode()
|
||||
|
||||
- assert (
|
||||
- "local variable 'y' referenced before assignment"
|
||||
- in html_error
|
||||
- )
|
||||
+ assert "local variable 'y'" in html_error
|
||||
|
||||
def test_code_block_line_number(self):
|
||||
l = TemplateLookup()
|
@ -9,6 +9,9 @@ Summary: Mako template library for Python
|
||||
URL: http://www.makotemplates.org/
|
||||
Source0: https://github.com/sqlalchemy/mako/archive/rel_%(echo %{version} | sed "s/\./_/g").tar.gz
|
||||
|
||||
# patch for Python 3.11 compatibility to reduce exception message
|
||||
Patch: https://github.com/sqlalchemy/mako/commit/9b8da4b1e2bdc025b643f2061aa32bf7ae0c78a8.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-setuptools
|
||||
|
Loading…
Reference in New Issue
Block a user