Overview

PyGObject 3.50, released on September 1, 2024, updates bindings to GTK 4 and improves GNOME compatibility.

Main Features

GTK 4

PyGObject 3.50 improves GTK 4 support with better bindings for new widgets and GPU rendering.

python
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk

class MyApp(Gtk.Application):
    def do_activate(self):
        window = Gtk.ApplicationWindow(application=self)
        window.set_title('PyGObject 3.50 - GTK 4')
        label = Gtk.Label(label='Hello GTK 4!')
        window.set_child(label)
        window.present()

app = MyApp()
app.run()

Sources