Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cffca75

Browse files
authored
Merge pull request #11182 from expectocode/gobject-deprecation
Use GLib.MainLoop() instead of deprecated GObject.MainLoop()
2 parents 7828fdf + 8d0b5e5 commit cffca75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def _backend_selection():
9696
# The mainloop is running.
9797
rcParams['backend'] = 'qt5Agg'
9898
elif 'gtk' in sys.modules and 'gi' in sys.modules:
99-
from gi.repository import GObject
100-
if GObject.MainLoop().is_running():
99+
from gi.repository import GLib
100+
if GLib.MainLoop().is_running():
101101
rcParams['backend'] = 'GTK3Agg'
102102
elif 'Tkinter' in sys.modules and not backend == 'TkAgg':
103103
# import Tkinter

0 commit comments

Comments
 (0)