beeware / gbulb

GLib implementation of PEP 3156
Other
64 stars 24 forks source link

Incompatible with PyGObject 3.50.0 #185

Open freakboy3742 opened 1 month ago

freakboy3742 commented 1 month ago

Describe the bug

PyGObject 3.50.0 is evidently incompatible with GBulb; it now requires a running() API that Gbulb doesn't currently implement.

Steps to reproduce

  1. Create and run a "hello world" Toga app
  2. See error
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app/tests/testbed.py", line 202, in <module>
    app.main_loop()
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app_packages/toga/app.py", line 481, in main_loop
    self._impl.main_loop()
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app_packages/toga_gtk/app.py", line 149, in main_loop
    self.loop.run_forever(application=self.native)
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app_packages/gbulb/glib_events.py", line 886, in run_forever
    self.run()
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app_packages/gbulb/gtk.py", line 39, in run
    super().run()
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app_packages/gbulb/glib_events.py", line 839, in run
    self._application.run(self._argv)
  File "/home/runner/work/toga/toga/testbed/build/testbed/ubuntu/jammy/testbed-0.0.1/usr/lib/testbed/app_packages/gi/overrides/Gio.py", line 41, in run
    with get_event_loop(GLib.MainContext.default()).running(self.quit):
AttributeError: 'GtkEventLoop' object has no attribute 'running'. Did you mean: '_running'?

Expected behavior

App should start without error.

Screenshots

No response

Environment

Logs

Additional context

No response

freakboy3742 commented 1 month ago

Although the fix for this is likely trivial, the fact that PyGObject 3.50.0 is now available means GBulb is no longer required, as there is native event loop support baked into PyGObject itself. As a result, this bug is the trigger for archiving GBulb as a project.