Bug 2325887 - mu: FTBFS in all supported Fedora releases
Summary: mu: FTBFS in all supported Fedora releases
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mu
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: F41FTBFS F42FTBFS PYTHON3.14 F39FTBFS F40FTBFS
TreeView+ depends on / blocked
 
Reported: 2024-11-13 11:39 UTC by Miro Hrončok
Modified: 2024-11-18 18:35 UTC (History)
3 users (show)

Fixed In Version: mu-1.2.0-18.fc42
Clone Of:
Environment:
Last Closed: 2024-11-18 18:35:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources mu pull-request 28 0 None None None 2024-11-18 17:38:17 UTC
Github mu-editor mu pull 2528 0 None open Tests: Avoid calling reset_mock() on a mock of super() to avoid RecursionError 2024-11-18 17:20:10 UTC
Github mu-editor mu pull 2529 0 None open Tests: Explicitly set cursor position 2024-11-18 17:35:32 UTC

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.


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