diff --git a/00375-fix-test_distance-to-enable-Python-build-on-i686.patch b/00375-fix-test_distance-to-enable-Python-build-on-i686.patch new file mode 100644 index 0000000..c08677a --- /dev/null +++ b/00375-fix-test_distance-to-enable-Python-build-on-i686.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 24 Jan 2022 08:56:03 +0100 +Subject: [PATCH] 00375-fix-test_distance-to-enable-Python-build-on-i686.patch + +00375 # +Fix precision in test_distance (test.test_turtle.TestVec2D). +See: https://bugzilla.redhat.com/show_bug.cgi?id=2038843 +--- + Lib/test/test_turtle.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Lib/test/test_turtle.py b/Lib/test/test_turtle.py +index 8f8434c5f4c..f7f28174463 100644 +--- a/Lib/test/test_turtle.py ++++ b/Lib/test/test_turtle.py +@@ -217,7 +217,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase): + def test_distance(self): + vec = Vec2D(6, 8) + expected = 10 +- self.assertEqual(abs(vec), expected) ++ self.assertAlmostEqual(abs(vec), expected) + + vec = Vec2D(0, 0) + expected = 0 +@@ -225,7 +225,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase): + + vec = Vec2D(2.5, 6) + expected = 6.5 +- self.assertEqual(abs(vec), expected) ++ self.assertAlmostEqual(abs(vec), expected) + + def test_rotate(self): + diff --git a/python2.7.spec b/python2.7.spec index d608480..921fccd 100644 --- a/python2.7.spec +++ b/python2.7.spec @@ -74,7 +74,7 @@ URL: https://www.python.org/ #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 18%{?dist} +Release: 19%{?dist} %if %{with rpmwheels} License: Python %else @@ -826,6 +826,11 @@ Patch366: 00366-CVE-2021-3733.patch # Backported from Python 3. Patch368: 00368-CVE-2021-3737.patch +# 00375 # 5488ab84d2447aa8df8b3502e76f151ac2488947 +# Fix precision in test_distance (test.test_turtle.TestVec2D). +# See: https://bugzilla.redhat.com/show_bug.cgi?id=2038843 +Patch375: 00375-fix-test_distance-to-enable-Python-build-on-i686.patch + # (New patches go here ^^^) # # When adding new patches to "python2" and "python3" in Fedora, EL, etc., @@ -990,6 +995,7 @@ git apply %{PATCH351} %patch359 -p1 %patch366 -p1 %patch368 -p1 +%patch375 -p1 %if %{without tkinter} %patch4000 -p1 @@ -1677,6 +1683,10 @@ CheckPython \ # ====================================================== %changelog +* Mon Jan 24 2022 Karolina Surma - 2.7.18-19 +- Fix test to enable build with i686 +Resolves: rhbz#2038843 + * Fri Jan 21 2022 Fedora Release Engineering - 2.7.18-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild