Skip to content

Warn with FutureWarning on < 3.3a daemon reads ahead of VersionTooLow #958

In review

Description

@tony

Summary

Emit a FutureWarning when lenient Server reads (Server.sessions, Server.attached_sessions, Server.windows, Server.panes, Server.clients, and Server.is_alive()) talk to a connected tmux daemon below 3.3a, while returning QueryList([]) or False for one release cycle before propagating VersionTooLow (#777).

Motivation

  • 0.65.0 (tmux(feat[minimum]): Require tmux 3.3a #888) raised TMUX_MIN_VERSION to "3.3a", and Verify connected tmux daemon meets the 3.3a minimum before dispatch #777 checks the connected daemon's #{version} before command dispatch rather than trusting the tmux executable on PATH.
  • Downstream tools such as tmuxp and libtmux-mcp read server.sessions and server.is_alive() as non-throwing probes. On hosts where the tmux package was upgraded while an older < 3.3a daemon stayed running in memory, propagating VersionTooLow from those read accessors without a warning window breaks status checks and shell completions without warning.
  • The executable-only helpers in libtmux.common (get_version, has_gte_version, and siblings) also lack a reference table entry in MIGRATION.

Proposal

  • Stage Verify connected tmux daemon meets the 3.3a minimum before dispatch #777 across two stacked pull requests:
    1. Deprecation PR (0.72.0): enforce the hook-free connected-daemon 3.3a check and if-shell -F replacement fence on commands and Server.raise_if_dead(), deprecate the executable-only helpers in libtmux.common with DeprecationWarning, and have Server.sessions, Server.attached_sessions, Server.windows, Server.panes, Server.clients, and Server.is_alive() catch VersionTooLow, emit a FutureWarning naming the accessor and reported daemon version, and return QueryList([]) or False. Record both deprecation families in MIGRATION reference tables and runnable migration examples.
    2. Enforcement PR (0.73.0, stacked on the deprecation PR): let VersionTooLow propagate from Server.sessions, Server.attached_sessions, Server.windows, Server.panes, Server.clients, and Server.is_alive(), and move the MIGRATION table entry from FutureWarning to enforced behavior.

Alternatives

  • Propagating VersionTooLow from server.sessions and server.is_alive() in one step without a warning release: rejected because lenient read accessors are documented not to raise on ordinary probes (0.57.0 reverted an unannounced list-accessor raise), and callers need a release window to restart older daemons or handle VersionTooLow.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: tmux-versionsbehavior-changeenhancement

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions