Commit 6b7fa82
committed
Address review findings: comment accuracy, test hardening, trio reap pin
Source and docs (comment/docstring-level; one dead-code removal):
- Correct the shutdown shield comment: a native task.cancel() delivered
while cleanup is in progress can abort it regardless of count; the
consumed-at-the-yield arithmetic only covered cancellation that
initiated teardown.
- Scope the pipe-gated process.wait() claims to asyncio on Python
3.11+ (3.10 and trio resolve on process exit alone), in the
_wait_for_process_exit docstring and the migration guide.
- Add sunset notes to the cpython#106749 tracer workarounds (3.11-only;
revert when 3.11 support is dropped).
- Document stdio_client's raised exceptions (Raises: section).
- Document the Job Object pre-assignment window in create_windows_process
and at the assignment call site; document the _process_jobs
WeakKeyDictionary's two load-bearing invariants (PyHANDLE values,
identity-hashed weakref keys); fix a wrong comment about the
CloseHandle failure path in _maybe_assign_process_to_job.
- Drop FallbackProcess.stdin_raw/stdout_raw (write-only attributes).
Tests:
- Fix the inert leak canary in the OSError spawn-failure test: the
pytest.raises ExceptionInfo pinned the leaked streams across
gc.collect(); drop it before collecting (mutation-verified).
- Correct the EPERM escalation test's pre-fix description (the old code
fell back to a leader-only kill, leaking other group members - it did
not hang forever) and trim an unasserted claim from the
write-after-death docstring.
- Add a CRLF-framed message to the chunk-reframing test, pinning the
trailing-CR tolerance Windows servers rely on, on every platform.
- Pin the grace wait's returncode read (what reaps the leader's zombie
on trio) with a read-counting stub, parametrized over asyncio and
trio; deleting the read fails the test on both backends.
- Add the missing width-justification comment to one fail_after(10.0).1 parent fb960d9 commit 6b7fa82
4 files changed
Lines changed: 124 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
| |||
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | | - | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
| |||
261 | 268 | | |
262 | 269 | | |
263 | 270 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| |||
377 | 384 | | |
378 | 385 | | |
379 | 386 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
386 | 393 | | |
387 | 394 | | |
388 | 395 | | |
389 | 396 | | |
390 | 397 | | |
391 | 398 | | |
392 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
393 | 403 | | |
394 | 404 | | |
395 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
| |||
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
83 | | - | |
84 | | - | |
| 95 | + | |
| 96 | + | |
85 | 97 | | |
86 | | - | |
87 | | - | |
| 98 | + | |
| 99 | + | |
88 | 100 | | |
89 | 101 | | |
90 | 102 | | |
| |||
133 | 145 | | |
134 | 146 | | |
135 | 147 | | |
136 | | - | |
137 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
138 | 153 | | |
139 | 154 | | |
140 | 155 | | |
| |||
160 | 175 | | |
161 | 176 | | |
162 | 177 | | |
163 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
164 | 183 | | |
165 | 184 | | |
166 | 185 | | |
| |||
239 | 258 | | |
240 | 259 | | |
241 | 260 | | |
242 | | - | |
243 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
244 | 266 | | |
245 | 267 | | |
246 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
| 234 | + | |
231 | 235 | | |
232 | | - | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| 240 | + | |
236 | 241 | | |
237 | 242 | | |
238 | 243 | | |
| |||
411 | 416 | | |
412 | 417 | | |
413 | 418 | | |
414 | | - | |
415 | | - | |
| 419 | + | |
| 420 | + | |
416 | 421 | | |
417 | 422 | | |
418 | 423 | | |
| |||
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
474 | 482 | | |
475 | 483 | | |
476 | 484 | | |
| |||
822 | 830 | | |
823 | 831 | | |
824 | 832 | | |
825 | | - | |
826 | | - | |
| 833 | + | |
| 834 | + | |
827 | 835 | | |
828 | 836 | | |
829 | 837 | | |
| |||
843 | 851 | | |
844 | 852 | | |
845 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
846 | 901 | | |
847 | 902 | | |
848 | 903 | | |
| |||
1056 | 1111 | | |
1057 | 1112 | | |
1058 | 1113 | | |
| 1114 | + | |
| 1115 | + | |
1059 | 1116 | | |
1060 | 1117 | | |
1061 | 1118 | | |
| |||
0 commit comments