Bug 2367456 - python-mplcursors: FTBFS in Fedora Rawhide
Summary: python-mplcursors: FTBFS in Fedora Rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-mplcursors
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: PYTHON3.14 F43FTBFS, RAWHIDEFTBFS
TreeView+ depends on / blocked
 
Reported: 2025-05-20 11:38 UTC by Karolina Surma
Modified: 2025-05-31 03:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-31 03:08:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github matplotlib matplotlib pull 30096 0 None open Fix OffsetBox custom picker 2025-05-22 09:33:54 UTC

Description Karolina Surma 2025-05-20 11:38:26 UTC
Description of problem:
Package python-mplcursors fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
0.6-2.fc42

Steps to Reproduce:
koji build --scratch f43 python-mplcursors-0.6-2.fc42.src.rpm

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

Results:

_____________________________ test_line[Axes.plot] _____________________________
ax = <Axes: >, plotter = <function Axes.plot at 0x3ff647a5da0>
    @pytest.mark.parametrize("plotter", [Axes.plot, Axes.fill])
    def test_line(ax, plotter):
        artist, = plotter(ax, [0, .2, 1], [0, .8, 1], label="foo")
        cursor = mplcursors.cursor(multiple=True)
        # Far, far away.
        _process_event("__mouse_click__", ax, (0, 1), 1)
        assert len(cursor.selections) == len(ax.figure.artists) == 0
        # On the line.
        _process_event("__mouse_click__", ax, (.1, .4), 1)
        assert len(cursor.selections) == len(ax.figure.artists) == 1
        assert _parse_annotation(
            cursor.selections[0], r"foo\nx=(.*)\ny=(.*)") == approx((.1, .4))
        # Not removing it.
        _process_event("__mouse_click__", ax, (0, 1), 3)
        assert len(cursor.selections) == len(ax.figure.artists) == 1
        # Remove the text label; add another annotation.
        artist.set_label(None)
        _process_event("__mouse_click__", ax, (.6, .9), 1)
>       assert len(cursor.selections) == len(ax.figure.artists) == 2
E       AssertionError: assert 1 == 2
E        +  where 1 = len([Text(15, 15, 'foo\nx=0.099\ny=0.397')])
E        +    where [Text(15, 15, 'foo\nx=0.099\ny=0.397')] = <Figure size 640x480 with 1 Axes>.artists
E        +      where <Figure size 640x480 with 1 Axes> = <Axes: >.figure
tests/test_mplcursors.py:127: AssertionError
_____________________________ test_line[Axes.fill] _____________________________
ax = <Axes: >, plotter = <function Axes.fill at 0x3ff647a7ec0>
    @pytest.mark.parametrize("plotter", [Axes.plot, Axes.fill])
    def test_line(ax, plotter):
        artist, = plotter(ax, [0, .2, 1], [0, .8, 1], label="foo")
        cursor = mplcursors.cursor(multiple=True)
        # Far, far away.
        _process_event("__mouse_click__", ax, (0, 1), 1)
        assert len(cursor.selections) == len(ax.figure.artists) == 0
        # On the line.
        _process_event("__mouse_click__", ax, (.1, .4), 1)
        assert len(cursor.selections) == len(ax.figure.artists) == 1
        assert _parse_annotation(
            cursor.selections[0], r"foo\nx=(.*)\ny=(.*)") == approx((.1, .4))
        # Not removing it.
        _process_event("__mouse_click__", ax, (0, 1), 3)
        assert len(cursor.selections) == len(ax.figure.artists) == 1
        # Remove the text label; add another annotation.
        artist.set_label(None)
        _process_event("__mouse_click__", ax, (.6, .9), 1)
>       assert len(cursor.selections) == len(ax.figure.artists) == 2
E       AssertionError: assert 1 == 2
E        +  where 1 = len([Text(15, 15, 'foo\nx=0.099\ny=0.397')])
E        +    where [Text(15, 15, 'foo\nx=0.099\ny=0.397')] = <Figure size 640x480 with 1 Axes>.artists
E        +      where <Figure size 640x480 with 1 Axes> = <Axes: >.figure
tests/test_mplcursors.py:127: AssertionError
________________________________ test_steps_pre ________________________________
ax = <Axes: >
    def test_steps_pre(ax):
        ax.plot([0, 1], [0, 1], drawstyle="steps-pre")
        ax.set(xlim=(-1, 2), ylim=(-1, 2))
        cursor = mplcursors.cursor()
        _process_event("__mouse_click__", ax, (1, 0), 1)
        assert len(cursor.selections) == 0
        _process_event("__mouse_click__", ax, (0, .5), 1)
        index = cursor.selections[0].index
        assert (index.int, index.x, index.y) == approx((0, 0, .5))
        _process_event("__mouse_click__", ax, (.5, 1), 1)
        index = cursor.selections[0].index
>       assert (index.int, index.x, index.y) == approx((0, .5, 1))
E       assert (np.float64(0...298701298702)) == approx((0 ± 1... 1 ± 1.0e-02))
E         
E         comparison failed. Mismatched elements: 2 / 3:
E         Max absolute difference: 0.5048701298701298
E         Max relative difference: inf
E         Index | Obtained           | Expected     
E         1     | 0                  | 0.5 ± 1.0e-02
E         2     | 0.4951298701298702 | 1 ± 1.0e-02
tests/test_mplcursors.py:179: AssertionError
________________________________ test_steps_mid ________________________________
ax = <Axes: >
    def test_steps_mid(ax):
        ax.plot([0, 1], [0, 1], drawstyle="steps-mid")
        ax.set(xlim=(-1, 2), ylim=(-1, 2))
        cursor = mplcursors.cursor()
        _process_event("__mouse_click__", ax, (0, 1), 1)
        assert len(cursor.selections) == 0
        _process_event("__mouse_click__", ax, (1, 0), 1)
        assert len(cursor.selections) == 0
        _process_event("__mouse_click__", ax, (.25, 0), 1)
        index = cursor.selections[0].index
        assert (index.int, index.x, index.y) == approx((0, .25, 0))
        _process_event("__mouse_click__", ax, (.5, .5), 1)
        index = cursor.selections[0].index
>       assert (index.int, index.x, index.y) == approx((0, .5, .5))
E       assert (np.float64(0...193548399), 0) == approx((0 ± 1....5 ± 1.0e-02))
E         
E         comparison failed. Mismatched elements: 2 / 3:
E         Max absolute difference: 0.5
E         Max relative difference: inf
E         Index | Obtained            | Expected     
E         1     | 0.24596774193548399 | 0.5 ± 1.0e-02
E         2     | 0                   | 0.5 ± 1.0e-02
tests/test_mplcursors.py:195: AssertionError
_______________________________ test_steps_post ________________________________
ax = <Axes: >
    def test_steps_post(ax):
        ax.plot([0, 1], [0, 1], drawstyle="steps-post")
        ax.set(xlim=(-1, 2), ylim=(-1, 2))
        cursor = mplcursors.cursor()
        _process_event("__mouse_click__", ax, (0, 1), 1)
        assert len(cursor.selections) == 0
        _process_event("__mouse_click__", ax, (.5, 0), 1)
        index = cursor.selections[0].index
        assert (index.int, index.x, index.y) == approx((0, .5, 0))
        _process_event("__mouse_click__", ax, (1, .5), 1)
        index = cursor.selections[0].index
>       assert (index.int, index.x, index.y) == approx((0, 1, .5))
E       assert (np.float64(0...000000002), 0) == approx((0 ± 1....5 ± 1.0e-02))
E         
E         comparison failed. Mismatched elements: 2 / 3:
E         Max absolute difference: 0.5
E         Max relative difference: inf
E         Index | Obtained           | Expected     
E         1     | 0.5000000000000002 | 1 ± 1.0e-02  
E         2     | 0                  | 0.5 ± 1.0e-02
tests/test_mplcursors.py:212: AssertionError
________________________________ test_errorbar _________________________________
ax = <Axes: >
    def test_errorbar(ax):
        ax.errorbar(range(2), range(2), [(1, 1), (1, 2)])
        cursor = mplcursors.cursor()
        assert len(cursor.artists) == 1
        _process_event("__mouse_click__", ax, (0, 2), 1)
        assert len(cursor.selections) == 0
        _process_event("__mouse_click__", ax, (.5, .5), 1)
        assert cursor.selections[0].target == approx((.5, .5))
        assert _parse_annotation(
            cursor.selections[0], r"x=(.*)\ny=(.*)") == approx((.5, .5))
        _process_event("__mouse_click__", ax, (0, 1), 1)
>       assert cursor.selections[0].target == approx((0, 0))
E       assert array([0.4997..., 0.49976043]) == approx((0 ± 1... 0 ± 1.0e-02))
E         
E         comparison failed. Mismatched elements: 2 / 2:
E         Max absolute difference: 0.49976042781689856
E         Max relative difference: 1.0
E         Index | Obtained            | Expected   
E         0     | 0.4997604278168982  | 0 ± 1.0e-02
E         1     | 0.49976042781689856 | 0 ± 1.0e-02
tests/test_mplcursors.py:363: AssertionError
=========================== short test summary info ============================
FAILED tests/test_mplcursors.py::test_line[Axes.plot] - AssertionError: asser...
FAILED tests/test_mplcursors.py::test_line[Axes.fill] - AssertionError: asser...
FAILED tests/test_mplcursors.py::test_steps_pre - assert (np.float64(0...2987...
FAILED tests/test_mplcursors.py::test_steps_mid - assert (np.float64(0...1935...
FAILED tests/test_mplcursors.py::test_steps_post - assert (np.float64(0...000...
FAILED tests/test_mplcursors.py::test_errorbar - assert array([0.4997..., 0.4...
========================= 6 failed, 69 passed in 9.71s =========================

Comment 1 Fedora Update System 2025-05-31 03:04:27 UTC
FEDORA-2025-f3bddf1f53 (python-matplotlib-3.10.3-6.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bddf1f53

Comment 2 Fedora Update System 2025-05-31 03:08:00 UTC
FEDORA-2025-f3bddf1f53 (python-matplotlib-3.10.3-6.fc43) has been pushed to the Fedora 43 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.