python-matplotlib fails to build with Python 3.10: wx.Size(<float>, <float>): TypeError: Size(): arguments did not match any overloaded call: argument 1 has unexpected type 'numpy.float64'
python-matplotlib fails to build with Python 3.10.0a2.
Traceback (most recent call last):
File "<string>", line 23, in <module>
File "/builddir/build/BUILDROOT/python-matplotlib-3.3.3-1.fc34.x86_64/usr/lib64/python3.10/site-packages/matplotlib/pyplot.py", line 687, in figure
figManager = new_figure_manager(num, figsize=figsize,
File "/builddir/build/BUILDROOT/python-matplotlib-3.3.3-1.fc34.x86_64/usr/lib64/python3.10/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
return _backend_mod.new_figure_manager(*args, **kwargs)
File "/builddir/build/BUILDROOT/python-matplotlib-3.3.3-1.fc34.x86_64/usr/lib64/python3.10/site-packages/matplotlib/backends/backend_wx.py", line 1680, in new_figure_manager
return super().new_figure_manager(num, *args, **kwargs)
File "/builddir/build/BUILDROOT/python-matplotlib-3.3.3-1.fc34.x86_64/usr/lib64/python3.10/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/builddir/build/BUILDROOT/python-matplotlib-3.3.3-1.fc34.x86_64/usr/lib64/python3.10/site-packages/matplotlib/backends/backend_wx.py", line 1684, in new_figure_manager_given_figure
frame = cls._frame_class(num, figure)
File "/builddir/build/BUILDROOT/python-matplotlib-3.3.3-1.fc34.x86_64/usr/lib64/python3.10/site-packages/matplotlib/backends/backend_wx.py", line 925, in __init__
self.canvas.SetInitialSize(wx.Size(fig.bbox.width, fig.bbox.height))
TypeError: Size(): arguments did not match any overloaded call:
overload 1: too many arguments
overload 2: argument 1 has unexpected type 'numpy.float64'
...
FAILED test_backends_interactive.py::test_interactive_backend[toolbar2-wxagg]
FAILED test_backends_interactive.py::test_interactive_backend[toolbar2-wx] - ...
FAILED test_backends_interactive.py::test_interactive_backend[toolmanager-wxagg]
FAILED test_backends_interactive.py::test_interactive_backend[toolmanager-wx]
Maybe the numbers need to be rounded to integers first? See for example https://github.com/Ultimaker/Uranium/commit/095a7a68482d2fc984f7f8dae1ce67d429e8aff6 which was also necessary on Python 3.10.
For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01798022-python-matplotlib/
For all our attempts to build python-matplotlib with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/
Let us know here if you have any questions.
Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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.
Comment 1Elliott Sales de Andrade
2021-01-28 22:29:10 UTC
Unfortunately, it looks like either more things changed, or I missed something, so this won't be fixed with 3.3.4.