diff --git a/pkgs/by-name/tm/tmuxp/package.nix b/pkgs/by-name/tm/tmuxp/package.nix index 83713ad161a9..1eca86be3018 100644 --- a/pkgs/by-name/tm/tmuxp/package.nix +++ b/pkgs/by-name/tm/tmuxp/package.nix @@ -7,12 +7,12 @@ python3Packages.buildPythonApplication (finalAttrs: { pname = "tmuxp"; - version = "1.67.0"; + version = "1.70.0"; pyproject = true; src = fetchPypi { inherit (finalAttrs) pname version; - hash = "sha256-mQcg2fpab0dYeQrswgHS0prwrZrYxHtYrCCssOipTxI="; + hash = "sha256-XanIOOlZjN5K4hTyd/n0mFotB7GAreQhp6UimdQp+Vw="; }; build-system = with python3Packages; [ diff --git a/pkgs/development/python-modules/libtmux/0001-fix-test_control_mode_stdout_preserves_non_ascii_out.patch b/pkgs/development/python-modules/libtmux/0001-fix-test_control_mode_stdout_preserves_non_ascii_out.patch new file mode 100644 index 000000000000..5573ebeff86f --- /dev/null +++ b/pkgs/development/python-modules/libtmux/0001-fix-test_control_mode_stdout_preserves_non_ascii_out.patch @@ -0,0 +1,37 @@ +From 8e12cc39f60012b6abb3a097f97950fe2c061386 Mon Sep 17 00:00:00 2001 +From: Michael Daniels +Date: Sun, 24 May 2026 10:09:00 -0400 +Subject: [PATCH] fix test_control_mode_stdout_preserves_non_ascii_output in + nix sandbox + +The select() call times out when in the nix sandbox for unknown reasons, +even though the fd is ready. +--- + tests/test_control_mode.py | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tests/test_control_mode.py b/tests/test_control_mode.py +index f72f6846..1a564e78 100644 +--- a/tests/test_control_mode.py ++++ b/tests/test_control_mode.py +@@ -4,7 +4,6 @@ from __future__ import annotations + + import locale + import os +-import select + import sys + import typing as t + +@@ -87,9 +86,6 @@ def test_control_mode_stdout_preserves_non_ascii_output( + ) + + for _ in range(20): +- ready, _, _ = select.select([ctl.stdout], [], [], 1) +- assert ready, "timed out waiting for control-mode output" +- + line = ctl.stdout.readline() + if FORMAT_SEPARATOR in line: + break +-- +2.51.2 + diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index c6917416da86..52dd7c0596df 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -7,22 +7,25 @@ ncurses, procps, pytest-rerunfailures, + pytest-xdist, pytestCheckHook, tmux, }: buildPythonPackage (finalAttrs: { pname = "libtmux"; - version = "0.55.1"; + version = "0.58.0"; pyproject = true; src = fetchFromGitHub { owner = "tmux-python"; repo = "libtmux"; tag = "v${finalAttrs.version}"; - hash = "sha256-A8mi0Q9ScbHmFRSvcF+wbn+lAO8B3/rU/+HvTXvxWPE="; + hash = "sha256-w5WutYesmIIBhWtcT5Qahyx7NffRBM+MPE7KOGF3fkU="; }; + patches = [ ./0001-fix-test_control_mode_stdout_preserves_non_ascii_out.patch ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace-fail '"--doctest-docutils-modules",' "" @@ -31,35 +34,34 @@ buildPythonPackage (finalAttrs: { build-system = [ hatchling ]; nativeCheckInputs = [ - procps - tmux ncurses - pytest-rerunfailures + procps pytestCheckHook + pytest-rerunfailures + pytest-xdist + tmux ]; enabledTestPaths = [ "tests" ]; - disabledTests = [ + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test/test_retry.py" ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # Fail with: 'no server running on /tmp/tmux-1000/libtmux_test8sorutj1'. "test_new_session_width_height" - # Assertion error + # AssertionError: assert '' == '$' + "test_capture_pane" + # AssertionError: assert '' == '$' "test_capture_pane_start" - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # tests/test_pane.py:113: AssertionError - "test_capture_pane_start" - # assert (1740973920.500444 - 1740973919.015309) <= 1.1 - "test_retry_three_times" - "test_function_times_out_no_raise" - # assert False - "test_retry_three_times_no_raise_assert" + # AssertionError: assert '' == '$' + "test_capture_pane_end" + # IndexError: list index out of range + "test_new_window_with_environment" ]; - disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test/test_retry.py" ]; - pythonImportsCheck = [ "libtmux" ]; + __darwinAllowLocalNetworking = true; + meta = { description = "Typed scripting library / ORM / API wrapper for tmux"; homepage = "https://libtmux.git-pull.com/";