We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af1430a + 7988371 commit 8938880Copy full SHA for 8938880
automation/src/automation/bootstraps/toga.py
@@ -26,10 +26,8 @@ def startup(self):
26
self.main_window.content = main_box
27
self.main_window.show()
28
29
- self.add_background_task(self.exit_soon)
30
-
31
- async def exit_soon(self, app: toga.App, **kwargs):
32
- """Background task that closes the app after a few seconds."""
+ async def on_running(self):
+ """Close the app after a few seconds."""
33
await asyncio.sleep(2)
34
print("{EXIT_SUCCESS_NOTIFY}")
35
print("{BRIEFCASE_EXIT_SUCCESS_SIGNAL}")
changes/1977.misc.rst
@@ -0,0 +1 @@
1
+The deprecated ``add_background_task()`` API was replaced in the Toga automation bootstrap.
0 commit comments