Gregory P. Smith
2754e9a615
gh-47798: Refactor the POSIX subprocess.Popen._communicate selector loop into helpers (GH-149032)
...
No public API change. Lift the per-iteration select/read/write loop out of
Popen._communicate (POSIX) into a module-level _communicate_io_posix(), with
small _flush_stdin / _make_input_view / _translate_newlines helpers alongside
it. Popen._communicate calls the helper and persists the returned input
offset for resume-after-timeout.
Retire the private Popen._remaining_time method in favor of module-level
_deadline_remaining; all call sites (POSIX and Windows) updated.
Defensive behavioural deltas: the stdin and stdout/stderr .close() calls in
the I/O loop now swallow BrokenPipeError / OSError, matching __exit__ and the
no-input path; previously these were bare.
Adds test_communicate_timeout_resume_partial_write to cover _input_offset
bookkeeping across TimeoutExpired/resume.
2026-04-27 00:40:20 +00:00
..
2026-04-08 23:42:26 +01:00
2026-04-25 15:24:40 +01:00
2026-04-14 23:29:41 -05:00
2026-04-07 15:26:53 +02:00
2026-03-21 14:06:07 +01:00
2026-01-20 08:50:34 +02:00
2026-04-14 09:10:08 -04:00
2026-03-17 15:02:59 +01:00
2026-03-27 20:48:07 +00:00
2026-04-22 19:22:31 +00:00
2026-04-12 10:06:41 -07:00
2026-04-12 18:15:01 -04:00
2026-04-23 15:27:02 +00:00
2026-03-26 12:41:14 +00:00
2026-04-14 23:31:58 +00:00
2026-04-25 22:27:11 +01:00
2026-04-07 14:24:03 +03:00
2026-02-15 17:43:39 -08:00
2026-03-03 19:48:03 +01:00
2026-04-04 11:27:27 +08:00
2026-04-27 00:40:20 +00:00
2026-02-25 10:34:00 +02:00
2026-02-03 13:41:57 +01:00
2026-04-06 09:42:10 -07:00
2026-03-19 19:39:41 -07:00
2026-02-05 16:32:17 +02:00
2026-04-13 11:50:46 +00:00
2026-03-06 13:22:21 +01:00
2026-03-30 19:42:24 +03:00
2026-02-20 00:48:01 +02:00
2026-04-04 13:29:17 +01:00
2026-02-03 16:37:34 +08:00
2026-03-09 10:37:23 -07:00
2026-02-17 10:54:41 +01:00
2026-04-26 22:14:33 +03:00
2026-02-12 00:15:33 +00:00
2026-04-16 15:22:22 +01:00
2026-02-24 22:52:02 +00:00
2026-03-25 14:34:50 +01:00
2026-03-10 14:58:32 +01:00
2026-04-14 17:15:27 -07:00
2026-04-23 06:22:20 -07:00
2026-03-18 17:04:11 +02:00
2026-04-26 10:15:54 +01:00
2026-04-25 16:02:51 -07:00
2026-02-10 00:01:17 +00:00
2026-04-14 00:32:54 +02:00
2026-02-04 13:20:18 +02:00
2026-02-21 15:30:40 +00:00
2026-04-25 22:57:38 -07:00
2026-02-22 19:59:40 -06:00
2026-02-12 00:15:33 +00:00
2026-03-06 10:25:09 +01:00
2026-02-05 22:37:05 +02:00
2026-03-30 11:11:13 +02:00
2026-03-06 10:25:09 +01:00
2026-03-02 08:56:28 -03:00
2026-01-20 19:28:48 -06:00
2026-02-23 12:31:35 -06:00
2026-01-20 20:45:42 +00:00
2026-04-25 19:13:48 +03:00
2026-02-12 00:15:33 +00:00
2026-04-20 11:47:37 +03:00
2026-02-16 14:14:26 +01:00
2026-03-23 22:16:41 +02:00
2026-03-30 22:05:18 +03:00
2026-04-16 15:22:22 +01:00
2026-03-06 10:25:09 +01:00
2026-03-10 14:58:32 +01:00
2026-02-05 19:50:51 +00:00
2026-04-07 11:39:50 +02:00
2026-03-06 10:25:09 +01:00
2026-03-31 15:45:23 +03:00
2026-01-20 20:46:32 +00:00
2026-02-05 22:37:05 +02:00
2026-04-14 14:37:41 +03:00
2026-02-10 00:01:17 +00:00
2026-03-10 14:58:32 +01:00
2026-02-12 00:15:33 +00:00
2026-02-25 16:44:17 +02:00
2026-03-10 14:58:32 +01:00
2026-04-08 17:46:25 -04:00
2026-04-13 21:06:36 +00:00
2026-03-06 10:25:09 +01:00
2026-01-20 14:05:42 +02:00
2026-04-22 22:06:56 -05:00
2026-04-27 00:40:20 +00:00
2026-03-06 10:25:09 +01:00
2026-03-11 13:47:55 +00:00
2026-02-24 13:05:06 +02:00
2026-04-09 17:37:19 +03:00
2026-04-26 22:14:33 +03:00
2026-04-07 15:05:23 +02:00
2026-02-12 00:15:33 +00:00
2026-04-22 19:31:58 -07:00
2026-04-15 14:21:43 +02:00
2026-02-18 13:17:08 +00:00
2026-04-13 19:02:52 +00:00