From bfc8c24b3c2e8517673308e35a656afbc7a4e91b Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Tue, 29 Apr 2025 02:22:08 +0800 Subject: [PATCH 01/17] gh-133089: Make `subprocess.run`'s behavior is same with 'timeout=None' when the timeout is zero Signed-off-by: Manjusaka --- Lib/subprocess.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index da5f5729e097e9..3a6779812d8162 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1191,6 +1191,8 @@ def communicate(self, input=None, timeout=None): universal_newlines. """ + timeout = None if timeout == 0 else timeout + if self._communication_started and input: raise ValueError("Cannot send input after starting communication") @@ -1268,6 +1270,7 @@ def _check_timeout(self, endtime, orig_timeout, stdout_seq, stderr_seq, def wait(self, timeout=None): + timeout = None if timeout == 0 else timeout """Wait for child process to terminate; returns self.returncode.""" if timeout is not None: endtime = _time() + timeout From 8c783905ca16bf926de6ffe7d99d66eb28f0e88c Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Tue, 29 Apr 2025 02:23:10 +0800 Subject: [PATCH 02/17] Add news Signed-off-by: Manjusaka --- .../next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst diff --git a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst new file mode 100644 index 00000000000000..e759a6b5ac8756 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst @@ -0,0 +1,2 @@ +Make :func:``subprocess.run``'s behavior is same with 'timeout=None' when +the timeout is zero From 3924393a3741ddf15be707fb9a914b64c8b58286 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Tue, 29 Apr 2025 02:27:13 +0800 Subject: [PATCH 03/17] fix lint Signed-off-by: Manjusaka --- .../next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst index e759a6b5ac8756..21a541bfac8dc5 100644 --- a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst +++ b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst @@ -1,2 +1,2 @@ -Make :func:``subprocess.run``'s behavior is same with 'timeout=None' when +Make :func:`subprocess.run`'s behavior is same with 'timeout=None' when the timeout is zero From 0bbe69e0aaa781eb877881f4c000aa06a3b6cf16 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sat, 3 May 2025 12:50:56 +0800 Subject: [PATCH 04/17] Fix review idea Signed-off-by: Manjusaka --- Lib/subprocess.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 3a6779812d8162..e6d005184ef37c 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1191,8 +1191,6 @@ def communicate(self, input=None, timeout=None): universal_newlines. """ - timeout = None if timeout == 0 else timeout - if self._communication_started and input: raise ValueError("Cannot send input after starting communication") @@ -1270,7 +1268,6 @@ def _check_timeout(self, endtime, orig_timeout, stdout_seq, stderr_seq, def wait(self, timeout=None): - timeout = None if timeout == 0 else timeout """Wait for child process to terminate; returns self.returncode.""" if timeout is not None: endtime = _time() + timeout @@ -2034,7 +2031,7 @@ def _wait(self, timeout): if self.returncode is not None: return self.returncode - if timeout is not None: + if timeout is not None and timeout > 0: endtime = _time() + timeout # Enter a busy loop if we have a timeout. This busy loop was # cribbed from Lib/threading.py in Thread.wait() at r71065. @@ -2052,7 +2049,7 @@ def _wait(self, timeout): finally: self._waitpid_lock.release() remaining = self._remaining_time(endtime) - if remaining <= 0: + if remaining < 0: raise TimeoutExpired(self.args, timeout) delay = min(delay * 2, remaining, .05) time.sleep(delay) From 1274363575f18af10323b204f67195da4a99034a Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sat, 3 May 2025 12:52:16 +0800 Subject: [PATCH 05/17] Fix review idea Signed-off-by: Manjusaka --- Lib/test/test_subprocess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 3cb755cd56cac8..3907267fabe0db 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1660,7 +1660,8 @@ def test_timeout(self): # child. with self.assertRaises(subprocess.TimeoutExpired): self.run_python("while True: pass", timeout=0.0001) - + def test_timeout_zero(self): + self.run_python("import time; time.sleep(0.1)", timeout=0) def test_capture_stdout(self): # capture stdout with zero return code cp = self.run_python("print('BDFL')", stdout=subprocess.PIPE) From eca303df0e49f64cf99b4de3be464cca8434a1e6 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sat, 3 May 2025 12:52:33 +0800 Subject: [PATCH 06/17] format code Signed-off-by: Manjusaka --- Lib/test/test_subprocess.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 3907267fabe0db..946617f40db2e6 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1662,6 +1662,7 @@ def test_timeout(self): self.run_python("while True: pass", timeout=0.0001) def test_timeout_zero(self): self.run_python("import time; time.sleep(0.1)", timeout=0) + def test_capture_stdout(self): # capture stdout with zero return code cp = self.run_python("print('BDFL')", stdout=subprocess.PIPE) From b9637d3ba870a948c6fbb15f564c0173ec461ab1 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sat, 3 May 2025 13:09:10 +0800 Subject: [PATCH 07/17] update docs Signed-off-by: Manjusaka --- Doc/library/subprocess.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 05d09e304b32bf..2fd30a4d40cd61 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1525,6 +1525,30 @@ handling consistency are valid for these functions. Notes ----- +.. _subprocess-timeout-behavior: + +Timeout Behavior +--------------- + +When using the ``timeout`` parameter in functions like :func:`run`, +:meth:`Popen.wait`, or :meth:`Popen.communicate`, +users should be aware of the following behaviors: + +Process Creation Delay +~~~~~~~~~~~~~~~~~~~~~ + +The initial process creation itself cannot be interrupted on many platform APIs. +This means that even when specifying a timeout, you are not guaranteed to see a timeout exception +until at least after however long process creation takes. + +Extremely Small Timeout Values +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Setting very small timeout values (such as a few milliseconds) may result +in almost immediate :exc:`TimeoutExpired` exceptions because +process creation and system scheduling inherently require time. + + .. _converting-argument-sequence: Converting an argument sequence to a string on Windows From 5f746ee827968278c309779da3324ff7b7a0dbd6 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sat, 3 May 2025 22:02:56 +0800 Subject: [PATCH 08/17] update docs Signed-off-by: Manjusaka --- Lib/subprocess.py | 10 ++++++---- Lib/test/test_subprocess.py | 2 -- .../2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index e6d005184ef37c..28fd36edf13202 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -2031,7 +2031,7 @@ def _wait(self, timeout): if self.returncode is not None: return self.returncode - if timeout is not None and timeout > 0: + if timeout is not None: endtime = _time() + timeout # Enter a busy loop if we have a timeout. This busy loop was # cribbed from Lib/threading.py in Thread.wait() at r71065. @@ -2049,7 +2049,7 @@ def _wait(self, timeout): finally: self._waitpid_lock.release() remaining = self._remaining_time(endtime) - if remaining < 0: + if remaining <= 0: raise TimeoutExpired(self.args, timeout) delay = min(delay * 2, remaining, .05) time.sleep(delay) @@ -2145,8 +2145,10 @@ def _communicate(self, input, endtime, orig_timeout): selector.unregister(key.fileobj) key.fileobj.close() self._fileobj2output[key.fileobj].append(data) - - self.wait(timeout=self._remaining_time(endtime)) + try: + self.wait(timeout=self._remaining_time(endtime)) + except TimeoutExpired: + raise TimeoutExpired(self.args, orig_timeout) # All data exchanged. Translate lists into strings. if stdout is not None: diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 946617f40db2e6..3cb755cd56cac8 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1660,8 +1660,6 @@ def test_timeout(self): # child. with self.assertRaises(subprocess.TimeoutExpired): self.run_python("while True: pass", timeout=0.0001) - def test_timeout_zero(self): - self.run_python("import time; time.sleep(0.1)", timeout=0) def test_capture_stdout(self): # capture stdout with zero return code diff --git a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst index 21a541bfac8dc5..996a35d6ca3e14 100644 --- a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst +++ b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst @@ -1,2 +1,2 @@ -Make :func:`subprocess.run`'s behavior is same with 'timeout=None' when -the timeout is zero +Use origional timeout value for :exc:`TimeoutExpired` +when the func :meth:`subprocess.run` is called with a timeout From c2863a79f758a7b6fdb5cc4c01bf501bb37e8113 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 19:38:56 +0800 Subject: [PATCH 09/17] Update docs Signed-off-by: Manjusaka --- Doc/library/subprocess.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 2fd30a4d40cd61..d322e13f1c88b4 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1528,21 +1528,21 @@ Notes .. _subprocess-timeout-behavior: Timeout Behavior ---------------- +---------------- When using the ``timeout`` parameter in functions like :func:`run`, :meth:`Popen.wait`, or :meth:`Popen.communicate`, users should be aware of the following behaviors: Process Creation Delay -~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~ The initial process creation itself cannot be interrupted on many platform APIs. This means that even when specifying a timeout, you are not guaranteed to see a timeout exception until at least after however long process creation takes. Extremely Small Timeout Values -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Setting very small timeout values (such as a few milliseconds) may result in almost immediate :exc:`TimeoutExpired` exceptions because From 01864f866b91368446d782676c68c600affc5e25 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 19:51:19 +0800 Subject: [PATCH 10/17] Update docs Signed-off-by: Manjusaka --- Doc/library/subprocess.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index d322e13f1c88b4..e1d8f9c483c329 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1528,21 +1528,21 @@ Notes .. _subprocess-timeout-behavior: Timeout Behavior ----------------- +^^^^^^^^^^^^^^^^ When using the ``timeout`` parameter in functions like :func:`run`, :meth:`Popen.wait`, or :meth:`Popen.communicate`, users should be aware of the following behaviors: Process Creation Delay -~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^ The initial process creation itself cannot be interrupted on many platform APIs. This means that even when specifying a timeout, you are not guaranteed to see a timeout exception until at least after however long process creation takes. Extremely Small Timeout Values -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Setting very small timeout values (such as a few milliseconds) may result in almost immediate :exc:`TimeoutExpired` exceptions because From 153432796d8bd19779d22c6d2dd3e3046381c65b Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 20:30:13 +0800 Subject: [PATCH 11/17] Update docs Signed-off-by: Manjusaka --- Doc/library/subprocess.rst | 21 +++++++++---------- ...-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index e1d8f9c483c329..cd3cbb4160ef20 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1534,19 +1534,18 @@ When using the ``timeout`` parameter in functions like :func:`run`, :meth:`Popen.wait`, or :meth:`Popen.communicate`, users should be aware of the following behaviors: -Process Creation Delay -^^^^^^^^^^^^^^^^^^^^^^ - -The initial process creation itself cannot be interrupted on many platform APIs. -This means that even when specifying a timeout, you are not guaranteed to see a timeout exception -until at least after however long process creation takes. +When using the ``timeout`` parameter in functions like :func:`run`, +:meth:`Popen.wait`, or :meth:`Popen.communicate`, +users should be aware of the following behaviors: -Extremely Small Timeout Values -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1. **Process Creation Delay**: The initial process creation itself cannot be interrupted + on many platform APIs. This means that even when specifying a timeout, you are not + guaranteed to see a timeout exception until at least after however long process + creation takes. -Setting very small timeout values (such as a few milliseconds) may result -in almost immediate :exc:`TimeoutExpired` exceptions because -process creation and system scheduling inherently require time. +2. **Extremely Small Timeout Values**: Setting very small timeout values (such as a few + milliseconds) may result in almost immediate :exc:`TimeoutExpired` exceptions because + process creation and system scheduling inherently require time. .. _converting-argument-sequence: diff --git a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst index 996a35d6ca3e14..36c4efcf9dc2a6 100644 --- a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst +++ b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst @@ -1,2 +1,2 @@ -Use origional timeout value for :exc:`TimeoutExpired` +Use origional timeout value for :exc:`subprocess.TimeoutExpired` when the func :meth:`subprocess.run` is called with a timeout From 1e791e17ef6002bc875a6edda29ed24cb27e304f Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 20:30:49 +0800 Subject: [PATCH 12/17] Update docs Signed-off-by: Manjusaka --- Doc/library/subprocess.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index cd3cbb4160ef20..9408f924d1a3eb 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1534,10 +1534,6 @@ When using the ``timeout`` parameter in functions like :func:`run`, :meth:`Popen.wait`, or :meth:`Popen.communicate`, users should be aware of the following behaviors: -When using the ``timeout`` parameter in functions like :func:`run`, -:meth:`Popen.wait`, or :meth:`Popen.communicate`, -users should be aware of the following behaviors: - 1. **Process Creation Delay**: The initial process creation itself cannot be interrupted on many platform APIs. This means that even when specifying a timeout, you are not guaranteed to see a timeout exception until at least after however long process From 7f3aedbb442506dde2bb31a595e2e6502f8e9d38 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 20:39:43 +0800 Subject: [PATCH 13/17] Update docs Signed-off-by: Manjusaka --- Doc/library/subprocess.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 9408f924d1a3eb..028a7861f36798 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1535,14 +1535,13 @@ When using the ``timeout`` parameter in functions like :func:`run`, users should be aware of the following behaviors: 1. **Process Creation Delay**: The initial process creation itself cannot be interrupted - on many platform APIs. This means that even when specifying a timeout, you are not - guaranteed to see a timeout exception until at least after however long process - creation takes. + on many platform APIs. This means that even when specifying a timeout, you are not + guaranteed to see a timeout exception until at least after however long process + creation takes. 2. **Extremely Small Timeout Values**: Setting very small timeout values (such as a few - milliseconds) may result in almost immediate :exc:`TimeoutExpired` exceptions because - process creation and system scheduling inherently require time. - + milliseconds) may result in almost immediate :exc:`TimeoutExpired` exceptions because + process creation and system scheduling inherently require time. .. _converting-argument-sequence: From 8af708e506715b06f93feed160e4dc547b2ec1f5 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 21:15:59 +0800 Subject: [PATCH 14/17] Add test Signed-off-by: Manjusaka --- Lib/test/test_subprocess.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 3cb755cd56cac8..d2db8fbcb64d52 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -162,6 +162,20 @@ def test_call_timeout(self): [sys.executable, "-c", "while True: pass"], timeout=0.1) + def test_timeout_exception(self): + try: + subprocess.run(['echo', 'hi'], timeout = -1) + except subprocess.TimeoutExpired as e: + self.assertIn("-1 seconds", str(e)) + else: + self.fail("Expected TimeoutExpired exception not raised") + try: + subprocess.run(['echo', 'hi'], timeout = 0) + except subprocess.TimeoutExpired as e: + self.assertIn("0 seconds", str(e)) + else: + self.fail("Expected TimeoutExpired exception not raised") + def test_check_call_zero(self): # check_call() function with zero return code rc = subprocess.check_call(ZERO_RETURN_CMD) From b3275b41253a6c3242a66c514c60200cb2fccf73 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 4 May 2025 21:55:59 +0800 Subject: [PATCH 15/17] Fix windows test Signed-off-by: Manjusaka --- Lib/subprocess.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 28fd36edf13202..59bb3b0934de74 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1235,8 +1235,10 @@ def communicate(self, input=None, timeout=None): finally: self._communication_started = True - - sts = self.wait(timeout=self._remaining_time(endtime)) + try: + sts = self.wait(timeout=self._remaining_time(endtime)) + except TimeoutExpired: + raise TimeoutExpired(self.args, timeout) return (stdout, stderr) From b68164b1e26bfefd7ffd6de570e9d9a1cfcc6402 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Mon, 5 May 2025 00:37:49 +0000 Subject: [PATCH 16/17] Modify timeout on the exiting exceptions. instead of creating a new one. --- Lib/subprocess.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 59bb3b0934de74..54c2eb515b60da 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1237,8 +1237,9 @@ def communicate(self, input=None, timeout=None): self._communication_started = True try: sts = self.wait(timeout=self._remaining_time(endtime)) - except TimeoutExpired: - raise TimeoutExpired(self.args, timeout) + except TimeoutExpired as exc: + exc.timeout = timeout + raise return (stdout, stderr) @@ -2149,8 +2150,9 @@ def _communicate(self, input, endtime, orig_timeout): self._fileobj2output[key.fileobj].append(data) try: self.wait(timeout=self._remaining_time(endtime)) - except TimeoutExpired: - raise TimeoutExpired(self.args, orig_timeout) + except TimeoutExpired as exc: + exc.timeout = orig_timeout + raise # All data exchanged. Translate lists into strings. if stdout is not None: From a1967d71bb64164ddedfd8b96403748fe7b29ae5 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sun, 4 May 2025 17:50:35 -0700 Subject: [PATCH 17/17] reword news. --- .../Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst index 36c4efcf9dc2a6..8c4257a12a90e5 100644 --- a/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst +++ b/Misc/NEWS.d/next/Library/2025-04-29-02-23-04.gh-issue-133089.8Jy1ZS.rst @@ -1,2 +1,4 @@ -Use origional timeout value for :exc:`subprocess.TimeoutExpired` +Use original timeout value for :exc:`subprocess.TimeoutExpired` when the func :meth:`subprocess.run` is called with a timeout +instead of sometimes a confusing partial remaining time out value +used internally on the final ``wait()``. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy