(zelf: &PyObject, vm: &VirtualMachine)
| 581 | |
| 582 | impl Destructor for _IOBase { |
| 583 | fn slot_del(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<()> { |
| 584 | // C-level IO types (FileIO, Buffered*, TextIOWrapper) have their own |
| 585 | // slot_del that calls iobase_finalize with proper _finalizing flag |
| 586 | // and _dealloc_warn chain. This base fallback is only reached by |
| 587 | // Python-level subclasses, where we silently discard close() errors |
| 588 | // to avoid surfacing unraisable from partially initialized objects. |
| 589 | let _ = vm.call_method(zelf, "close", ()); |
| 590 | Ok(()) |
| 591 | } |
| 592 | |
| 593 | #[cold] |
| 594 | fn del(_zelf: &Py<Self>, _vm: &VirtualMachine) -> PyResult<()> { |
nothing calls this directly
no test coverage detected