Bug 2433761 - python-matplotlib fails to build with Python 3.15: failure of test_norm_callback and test_fork
Summary: python-matplotlib fails to build with Python 3.15: failure of test_norm_callb...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: python-matplotlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-01-28 11:19 UTC by Karolina Surma
Modified: 2026-04-28 19:52 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github matplotlib matplotlib issues 31429 0 None open Incompatibility with Python 3.15 alpha 7 2026-04-23 01:39:14 UTC

Description Karolina Surma 2026-01-28 11:19:21 UTC
python-matplotlib (built without qt) fails to build with Python 3.15.0a5.

On top of the two failing tests, test_rcupdate fails in the current Rawhide, not pasting the traceback here.

______________________________ test_norm_callback ______________________________
[gw3] linux -- Python 3.15.0 /usr/bin/python3

    def test_norm_callback():
        increment = unittest.mock.Mock(return_value=None)
    
        norm = mcolors.Normalize()
        norm.callbacks.connect('changed', increment)
        # Haven't updated anything, so call count should be 0
        assert increment.call_count == 0
    
        # Now change vmin and vmax to test callbacks
        norm.vmin = 1
        assert increment.call_count == 1
        norm.vmax = 5
        assert increment.call_count == 2
        # callback shouldn't be called if setting to the same value
        norm.vmin = 1
        assert increment.call_count == 2
        norm.vmax = 5
        assert increment.call_count == 2
    
        # We only want autoscale() calls to send out one update signal
        increment.call_count = 0
        norm.autoscale([0, 1, 2])
>       assert increment.call_count == 1
E       AssertionError: assert 3 == 1
E        +  where 3 = <Mock id='139758474724416'>.call_count

../BUILDROOT/usr/lib64/python3.15/site-packages/matplotlib/tests/test_colors.py:1595: AssertionError
__________________________________ test_fork ___________________________________
[gw2] linux -- Python 3.15.0 /usr/bin/python3

    @pytest.mark.skipif(not hasattr(os, "register_at_fork"),
                        reason="Cannot register at_fork handlers")
    def test_fork():
        _model_handler(0)  # Make sure the font cache is filled.
        ctx = multiprocessing.get_context("fork")
>       with ctx.Pool(processes=2) as pool:
             ^^^^^^^^^^^^^^^^^^^^^

../BUILDROOT/usr/lib64/python3.15/site-packages/matplotlib/tests/test_font_manager.py:236: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.15/multiprocessing/context.py:119: in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
/usr/lib64/python3.15/multiprocessing/pool.py:215: in __init__
    self._repopulate_pool()
/usr/lib64/python3.15/multiprocessing/pool.py:306: in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
/usr/lib64/python3.15/multiprocessing/pool.py:329: in _repopulate_pool_static
    w.start()
/usr/lib64/python3.15/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
                  ^^^^^^^^^^^^^^^^^
/usr/lib64/python3.15/multiprocessing/context.py:281: in _Popen
    return Popen(process_obj)
           ^^^^^^^^^^^^^^^^^^
/usr/lib64/python3.15/multiprocessing/popen_fork.py:20: in __init__
    self._launch(process_obj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <multiprocessing.popen_fork.Popen object at 0x7fcf26ffe510>
process_obj = <ForkProcess name='ForkPoolWorker-1' parent=13231 initial daemon>

    def _launch(self, process_obj):
        code = 1
        parent_r, child_w = os.pipe()
        child_r, parent_w = os.pipe()
>       self.pid = os.fork()
                   ^^^^^^^^^
E       DeprecationWarning: This process (pid=13231) is multi-threaded, use of fork() may lead to deadlocks in the child.

https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10071424-python-matplotlib/

For all our attempts to build python-matplotlib with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-matplotlib/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


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