FS#77779 - [python-matplotlib] 3.6.3-1 Incompatibility with latest GTK

Attached to Project: Community Packages
Opened by Martin Diehl (MartinDiehl) - Wednesday, 08 March 2023, 11:07 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 23 May 2023, 06:37 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

pyplot failes on current GNOME (up to date Arch Linux). This could be related to an outdated version of https://archlinux.org/packages/extra/x86_64/python-gobject (already flagged).

to reproduce
```
from matplotlib import pyplot
pyplot.figure()
```

the error is
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 454, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/matplotlib/pyplot.py", line 783, in figure
manager = new_figure_manager(
File "/usr/lib/python3.10/site-packages/matplotlib/pyplot.py", line 359, in new_figure_manager
return _get_backend_mod().new_figure_manager(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 3513, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/usr/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 3518, in new_figure_manager_given_figure
return cls.FigureCanvas.new_manager(figure, num)
File "/usr/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 1703, in new_manager
return cls.manager_class.create_with_canvas(cls, figure, num)
File "/usr/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2830, in create_with_canvas
return cls(canvas_class(figure), num)
File "/usr/lib/python3.10/site-packages/matplotlib/backends/backend_gtk4.py", line 79, in __init__
css.load_from_data(b".matplotlib-canvas { background-color: white; }")
TypeError: Gtk.CssProvider.load_from_data() takes exactly 3 arguments (2 given)
```

Python version is 3.10.9, Matplotlib version is 3.6.3, python-gobject version is 3.42.2
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 23 May 2023, 06:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-matplotlib 3.7.1-1

Loading...