Repository navigation
The pytest capture patch now decides for itself whether pytest needs it.
install_capture_swap_fix guarded only on the two methods still coming from _pytest.capture, which identifies another patcher and nothing else. A pytest carrying its own fix keeps those methods where they are, so the guard admits it and the patch lands on the corrected implementation, putting the sys.stdout reassignment back into a capture that had stopped doing it.
Installing measures instead: a real SysCapture is driven through swap, suspend and resume, and only a pytest that loses the swap is patched. A probe that cannot be driven reports no defect.
The _pytest.capture import also moved inside the call. At module scope it made a renamed or removed class an ImportError during plugin load, taking every suite that installs the plugin with it on a routine pytest bump.
Full notes in CHANGELOG.md.