Commit 929a36a
committed
Add Windows-specific ResourceWarning filters with explanation
On Windows, process termination via TerminateProcess() is immediate and
doesn't allow subprocess.Popen cleanup handlers to run. This causes
ResourceWarnings when garbage collecting Popen objects from forcefully
terminated processes.
Added:
- Windows-specific warning filters to the three process termination tests
- Detailed comment explaining the Windows vs Unix termination differences
- Documentation about where TerminateProcess() is called (via psutil/anyio)
The warnings don't indicate process leaks - processes are properly
terminated. They only indicate that Popen objects couldn't run cleanup
code, which is expected behavior on Windows when forcefully terminating
process trees.1 parent 7c3e67c commit 929a36a
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
373 | 386 | | |
374 | 387 | | |
375 | 388 | | |
| |||
468 | 481 | | |
469 | 482 | | |
470 | 483 | | |
| 484 | + | |
471 | 485 | | |
472 | 486 | | |
473 | 487 | | |
| |||
574 | 588 | | |
575 | 589 | | |
576 | 590 | | |
| 591 | + | |
577 | 592 | | |
578 | 593 | | |
579 | 594 | | |
| |||
0 commit comments