From 1831025af677a771b8a35bfce69fba23ef76de7e Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Thu, 20 Aug 2026 20:14:09 +0800 Subject: [PATCH] Clarify external command timeout ownership Signed-off-by: Loren Eteval --- Furious/Frozenlib/Utility.py | 7 ++++--- tests/test_frozenlib.py | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Furious/Frozenlib/Utility.py b/Furious/Frozenlib/Utility.py index f0051c6..ef88cd3 100644 --- a/Furious/Frozenlib/Utility.py +++ b/Furious/Frozenlib/Utility.py @@ -182,10 +182,11 @@ def parseHostPort(address: str) -> Tuple[AnyStr | None, str | None]: def runExternalCommand(*args, **kwargs): - """Run a blocking external command with a bounded default wait. + """Run a blocking external command using caller-supplied subprocess options. - Callers remain responsible for keeping potentially slow host - operations off the GUI thread. + This low-level wrapper intentionally does not impose a timeout. Callers + decide whether their command may wait indefinitely and remain responsible + for keeping potentially slow host operations off the GUI thread. """ if PLATFORM == 'Windows': creationflags = kwargs.pop('creationflags', subprocess.CREATE_NO_WINDOW) diff --git a/tests/test_frozenlib.py b/tests/test_frozenlib.py index 05e6650..44c8e18 100644 --- a/tests/test_frozenlib.py +++ b/tests/test_frozenlib.py @@ -166,8 +166,8 @@ class FrozenlibUtilityTest(unittest.TestCase): with self.assertRaises(ValueError): UtilityModule.callRateLimited(-1) - def testExternalCommandsHaveAnOverridableBoundedTimeout(self): - """Apply the shared timeout without invoking a real child process.""" + def testExternalCommandsPreserveCallerTimeoutPolicy(self): + """Forward caller options without imposing a shared command timeout.""" completed = subprocess.CompletedProcess(['fixture'], 0) with ( @@ -190,7 +190,7 @@ class FrozenlibUtilityTest(unittest.TestCase): self.assertEqual( run.call_args_list, [ - mock.call(['fixture'], timeout=30.0), + mock.call(['fixture']), mock.call(['fixture'], timeout=1.5), ], )