Bug 2038843 - python2.7 and python3.6 fails to build on i686: test_turtle [test_distance (test.test_turtle.TestVec2D)] fails
Summary: python2.7 and python3.6 fails to build on i686: test_turtle [test_distance (t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.6
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karolina Surma
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F36FTBFS
TreeView+ depends on / blocked
 
Reported: 2022-01-10 09:58 UTC by Miro Hrončok
Modified: 2022-01-25 11:49 UTC (History)
8 users (show)

Fixed In Version: python3.6-3.6.15-6.fc36
Clone Of:
Environment:
Last Closed: 2022-01-25 11:01:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2022-01-10 09:58:28 UTC
Description of problem:

During an unrelated coordinated Rawhide rebuild, I've noticed python2.7 and python3.6 fail to build on i686 with a precision-related? bug:

======================================================================
FAIL: test_distance (test.test_turtle.TestVec2D)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.18/Lib/test/test_turtle.py", line 220, in test_distance
    self.assertEqual(abs(vec), expected)
AssertionError: 9.999999999999998 != 10
----------------------------------------------------------------------


======================================================================
FAIL: test_distance (test.test_turtle.TestVec2D)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.15/Lib/test/test_turtle.py", line 223, in test_distance
    self.assertEqual(abs(vec), expected)
AssertionError: 9.999999999999998 != 10
----------------------------------------------------------------------


Funnily enough, at least python3.6 succeeds on armv7hl.

python2.7: https://koji.fedoraproject.org/koji/taskinfo?taskID=80997420
python3.6: https://koji.fedoraproject.org/koji/taskinfo?taskID=80997409

Comment 1 Petr Viktorin (pviktori) 2022-01-10 10:06:25 UTC
Looks like these should use assertAlmostEqual (even in the newer versions, if it's not the case there).

https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertAlmostEqual

Comment 2 Victor Stinner 2022-01-10 12:15:42 UTC
Right, Python 3.11 uses assertAlmostEqual() since July 2021 (it's a recent change):

    def test_distance(self):
        self.assertEqual(abs(Vec2D(6, 8)), 10)
        self.assertEqual(abs(Vec2D(0, 0)), 0)
        self.assertAlmostEqual(abs(Vec2D(2.5, 6)), 6.5)

See:

* https://github.com/python/cpython/commit/3f135c073a53793ec68902f6b513934ddff47235
* https://bugs.python.org/issue44734

Comment 4 Fedora Update System 2022-01-25 10:58:28 UTC
FEDORA-2022-b0c84e7430 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b0c84e7430

Comment 5 Fedora Update System 2022-01-25 11:01:33 UTC
FEDORA-2022-b0c84e7430 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2022-01-25 11:46:12 UTC
FEDORA-2022-dce85ff0dc has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-dce85ff0dc

Comment 7 Fedora Update System 2022-01-25 11:49:37 UTC
FEDORA-2022-dce85ff0dc has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.