Skip to content

What is stable

turbodesk is at 0.4.2, and version numbers here follow Semantic Versioning. Before 1.0 that means a minor release may break something; the point of this page is to say exactly where, so you can tell which parts of the library you are safe to build on today.

The core (will freeze at 1.0)

These have two complete applications and two ports from other frameworks behind them and have not changed shape in months. Since 0.3 the two applications are separate products (Turbo Python and TurboVI), which makes them a stronger test of this list: they upgrade turbodesk like any other dependant and notice what moved. 1.0 will freeze them, and after it they change only in a major release:

  • View and its constructors and methods: text, rect, blank, passthrough, pad, crop, center, colored, tagged, find, and the handler methods.
  • The combinators, exported from turbodesk and from turbodesk.view: hcat, vcat, zcat.
  • The value types: Style, Color, Size, Pos, Region.
  • UI's hook and event surface: state, reducer, scope, every, task, spawn, now, on_event, on_drag, focus, focus_group, prefer_focus, open_modal, notify, exit, suspend, set_cursor, set_theme.
  • run, and turbodesk.testing.
  • The widget signatures in the catalogue, which a test already compares against inspect.signature on every commit.

Still moving

The Turbo Vision layer. turbodesk.windows, turbodesk.shell, widgets/frame, widgets/menu and widgets/statusline are newer. Most of them have one application and one demo behind them. Since 0.3 that application is Turbo Python, in its own repository, and examples/windows.py is the only caller left in this one.

turbodesk.fuzzy, new in 0.3: match and ranked score a subsequence match and say which characters matched. The functions are small and unlikely to change. The scoring may change, because which of two candidates comes first is a judgement that has already been corrected twice. Depend on the ranking being stable within a release, not across one.

They may change in a minor release, 1.0 included. The rule this library follows is that a module earns its shape from a second caller; these are still collecting theirs. Pin an exact version if you depend on them, and read the changelog before upgrading.

Themes and colours

Role names are stable. A widget asks for one of the twenty-six Catppuccin roles, which every flavour defines. The RGB values behind them may change: a flavour may be corrected or added.

What is explicitly not an API

  • Anything named with a leading underscore.
  • The escape sequences on the wire. terminal.py may change what it writes at any time, which is the point of having a painter.
  • The exact cells a widget draws. A snapshot of your own screen is your test, and turbodesk.testing.snapshot exists for that; a widget's internal layout is free to improve.
  • examples/. They are demonstrations and a test bed that move with whatever they demonstrate.

Moved names that still work

turbodesk.widgets.syntax is now turbodesk.syntax, and Highlight moved with it.

View.hcat, View.vcat and View.zcat are now the functions hcat, vcat and zcat, in turbodesk and in turbodesk.view. They were never constructors: an n-ary operation sat on the class only for namespacing.

Size, Pos and Region are in turbodesk.geometry. Color and Style are in turbodesk.style. Cell-width measurement (string_width, char_width, clusters) is in turbodesk.cells. turbodesk.view re-exports all of them, and from turbodesk import Size never moved.

Every old spelling above still works. They go at 1.0. This page will say which release removes them before it does. An application built against 0.3 keeps working on 0.4 without an edit.

Deprecations

Anything frozen that has to change gets a release where the old spelling still works and warns, before the release that removes it. A DeprecationWarning names the replacement.

Python and platforms

requires-python = ">=3.12". A minor release may add a version; dropping one is a major release.

POSIX only: turbodesk uses termios and tty directly and there is no Windows support today. Continuous integration covers Linux (Ubuntu and Alpine) and FreeBSD. macOS is supported and tested by hand, because the build service this project uses offers no macOS image.