Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Incompatible with PyGObject 3.50.0 #185

Open
freakboy3742 opened this issue Sep 13, 2024 · 1 comment
Open

Incompatible with PyGObject 3.50.0 #185

freakboy3742 opened this issue Sep 13, 2024 · 1 comment
Labels
bug A crash or error in behavior.

Comments

@freakboy3742
Copy link
Member

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

  • Operating System: Ubuntu 22.04
  • Python version: 3.10 (but likely all)
  • Software versions:
    • Briefcase: 0.3.19
    • Toga: 0.4.6
    • ...

Logs


Additional context

No response

@freakboy3742 freakboy3742 added the bug A crash or error in behavior. label Sep 13, 2024
@freakboy3742
Copy link
Member Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

1 participant