Skip to content

Update Textual backend to use new run API #3399

@freakboy3742

Description

@freakboy3742

What is the problem or limitation you are having?

With Textualize/textual#5091 being resolved, we're now in a position to use a documented API rather than a workaround to start the textual app.

Describe the solution you'd like

Replace the implementation of the Toga Textual App class' main_loop() method with an implementation that uses the (now documented) self.native.run(headless=self.headless, loop=self.loop) API.

This will also require bumping the minimum textual version to ensure the new API is available.

Describe alternatives you've considered

Keep the existing workaround

Additional context

At time of writing, the fix for Textualize/textual#5091 has just landed, so the API is not generally available in the currently available release (Textual 3.1.1). This change cannot be made until the next Textual release is published.

Textual publishes fairly regularly, so it seems likely this will be within a week or two of this ticket being opened.

When testing this, we need to verify that the issue that led to this workaround doesn't re-emerge: that is, when a Textual app exits, there shouldn't be any debug console output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.good first issueIs this your first time contributing? This could be a good place to start!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions