From 855625415922aa74c81925c6ea380b70bc864819 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 25 Jan 2022 09:10:53 +0100 Subject: [PATCH] Fix precision in test_turtle to enable build with i686 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2038843 --- ...est_distance-to-enable-build-on-i686.patch | 33 +++++++++++++++++++ python3.6.spec | 13 +++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 00375-fix-test_distance-to-enable-build-on-i686.patch diff --git a/00375-fix-test_distance-to-enable-build-on-i686.patch b/00375-fix-test_distance-to-enable-build-on-i686.patch new file mode 100644 index 0000000..0eb47b5 --- /dev/null +++ b/00375-fix-test_distance-to-enable-build-on-i686.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Mon, 24 Jan 2022 09:28:30 +0100 +Subject: [PATCH] 00375: Fix test_distance to enable build on i686 + +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 2fd10ccd50..2d2034ef8a 100644 +--- a/Lib/test/test_turtle.py ++++ b/Lib/test/test_turtle.py +@@ -220,7 +220,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 +@@ -228,7 +228,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/python3.6.spec b/python3.6.spec index 8718469..11b5755 100644 --- a/python3.6.spec +++ b/python3.6.spec @@ -17,7 +17,7 @@ URL: https://www.python.org/ #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 5%{?dist} +Release: 6%{?dist} License: Python @@ -450,6 +450,13 @@ Patch353: 00353-architecture-names-upstream-downstream.patch # - 8766cb74e186d3820db0a855ccd780d6d84461f7 Patch358: 00358-align-allocations-and-pygc_head-to-16-bytes-on-64-bit-platforms.patch +# 00375 # 5488ab84d2447aa8df8b3502e76f151ac2488947 +# Fix test_distance to enable build on i686 +# +# 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-build-on-i686.patch + # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora, EL, etc., @@ -1640,6 +1647,10 @@ CheckPython optimized # ====================================================== %changelog +* Tue Jan 25 2022 Karolina Surma - 3.6.15-6 +- Fix test to enable build with i686 +Resolves: rhbz#2038843 + * Fri Jan 21 2022 Fedora Release Engineering - 3.6.15-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild