From 67145da961ccdd649d970c270a559943485ecd53 Mon Sep 17 00:00:00 2001
From: Prithviraj Chaudhuri
Date: Fri, 26 Dec 2025 19:03:43 -0500
Subject: [PATCH 1/2] Changed condition to evaluate if timeout is less than or
equals to 0
---
Lib/subprocess.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 17333d8c02255d..3cebd7883fcf29 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -2140,7 +2140,7 @@ def _communicate(self, input, endtime, orig_timeout):
while selector.get_map():
timeout = self._remaining_time(endtime)
- if timeout is not None and timeout < 0:
+ if timeout is not None and timeout <= 0:
self._check_timeout(endtime, orig_timeout,
stdout, stderr,
skip_check_and_raise=True)
From d2f22e9768536d87c1ae3a10392c33e4f6d748e6 Mon Sep 17 00:00:00 2001
From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com>
Date: Sat, 27 Dec 2025 00:14:58 +0000
Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?=
=?UTF-8?q?rb=5Fit.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../next/Library/2025-12-27-00-14-56.gh-issue-142195.UgBEo5.rst | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Misc/NEWS.d/next/Library/2025-12-27-00-14-56.gh-issue-142195.UgBEo5.rst
diff --git a/Misc/NEWS.d/next/Library/2025-12-27-00-14-56.gh-issue-142195.UgBEo5.rst b/Misc/NEWS.d/next/Library/2025-12-27-00-14-56.gh-issue-142195.UgBEo5.rst
new file mode 100644
index 00000000000000..636259f541a659
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-12-27-00-14-56.gh-issue-142195.UgBEo5.rst
@@ -0,0 +1 @@
+Changed condition in Lib/subprocess.py _communicate to call _check_timeout when 'timeout <= 0'