Bug 2325887

Summary: mu: FTBFS in all supported Fedora releases
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: muAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mail, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/mu
Whiteboard:
Fixed In Version: mu-1.2.0-18.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-18 18:35:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2260875, 2300528, 2322407, 2168842, 2231791    

Description Miro Hrončok 2024-11-13 11:39:00 UTC
Description of problem:
Package mu fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.2.0-17.fc41

Steps to Reproduce:
fedpkg build

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/mu



=================================== FAILURES ===================================
_____________ test_EditorPane_toggle_comments_handle_crlf_newline ______________
    def test_EditorPane_toggle_comments_handle_crlf_newline():
        """
        Check that stray "\r\n" line endings don't lead to deleting the first
        character of the following line.
        """
        ep = mu.interface.editor.EditorPane(None, "test\r\nline 2\n")
        ep.hasSelectedText = mock.MagicMock(return_value=False)
        ep.toggle_comments()
>       assert ep.text() == "# test\nline 2\n"
E       AssertionError: assert 'test\r\nline 2\n' == '# test\nline 2\n'
E         
E         - # test
E         ? --
E         + test
E         ?     +
E           line 2
tests/interface/test_editor.py:940: AssertionError
__________________________ test_python_remove_plotter __________________________
    def test_python_remove_plotter():
        """
        Ensure the button states are returned to normal before calling super
        method.
        """
        editor = mock.MagicMock()
        view = mock.MagicMock()
        with mock.patch("builtins.super") as mock_super:
            pm = PythonMode(editor, view)
            pm.set_buttons = mock.MagicMock()
>           mock_super.reset_mock()
tests/modes/test_python3.py:489: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.13/unittest/mock.py:2232: in reset_mock
    super().reset_mock(*args, return_value=return_value, **kwargs)
/usr/lib64/python3.13/unittest/mock.py:2232: in reset_mock
    super().reset_mock(*args, return_value=return_value, **kwargs)
/usr/lib64/python3.13/unittest/mock.py:2232: in reset_mock
    super().reset_mock(*args, return_value=return_value, **kwargs)
E   RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)

Comment 1 Miro Hrončok 2024-11-18 17:16:07 UTC
The RecursionError is caused by calling reset_mock() on a mock of super.

reset_mock() now calls super() since https://github.com/python/cpython/issues/123934

Comment 2 Miro Hrončok 2024-11-18 17:20:11 UTC
(In reply to Miro Hrončok from comment #1)
> The RecursionError is caused by calling reset_mock() on a mock of super.
> 
> reset_mock() now calls super() since
> https://github.com/python/cpython/issues/123934

Fix in https://github.com/mu-editor/mu/pull/2528

Comment 3 Miro Hrončok 2024-11-18 17:35:33 UTC
The other test is https://github.com/mu-editor/mu/pull/2529

Comment 4 Miro Hrončok 2024-11-18 17:38:17 UTC
Downstream backports in https://src.fedoraproject.org/rpms/mu/pull-request/28

Comment 5 Fedora Update System 2024-11-18 18:29:25 UTC
FEDORA-2024-34067558de (mu-1.2.0-18.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-34067558de

Comment 6 Fedora Update System 2024-11-18 18:35:29 UTC
FEDORA-2024-34067558de (mu-1.2.0-18.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.