get_version_str
Return the tmux version string verbatim, preserving letter suffixes.
Source and package
- Qualified name
-
libtmux.common .get _version _str - Module
- libtmux.common
- Package
- libtmux
- Source
- src/libtmux/common.py
-
Description#
get_versionnormalizes point releases for numeric comparison ("3.7a"becomesLooseVersion("3.7")). This helper keeps the raw suffix, so callers can distinguish patch releases whose behavior differs -- for example the tmux 3.7 break-pane crash, reverted in 3.7a.Notes
Memoized via
functools.cache, keyed on tmux_bin, independently ofget_version. Callget_version_str.cache_clear()after swapping the tmux binary.Examples#
>>> isinstance(get_version_str(), str)True