(vm: &VirtualMachine, module: &Py<PyModule>)
| 5299 | } |
| 5300 | |
| 5301 | pub(crate) fn module_exec(vm: &VirtualMachine, module: &Py<PyModule>) -> PyResult<()> { |
| 5302 | // Call auto-generated initialization first |
| 5303 | __module_exec(vm, module); |
| 5304 | |
| 5305 | // Initialize FileIO types (requires host_env for filesystem access) |
| 5306 | #[cfg(feature = "host_env")] |
| 5307 | super::fileio::module_exec(vm, module)?; |
| 5308 | |
| 5309 | // Initialize WindowsConsoleIO type (Windows only) |
| 5310 | #[cfg(all(feature = "host_env", windows))] |
| 5311 | super::winconsoleio::module_exec(vm, module)?; |
| 5312 | |
| 5313 | let unsupported_operation = unsupported_operation().to_owned(); |
| 5314 | extend_module!(vm, module, { |
| 5315 | "UnsupportedOperation" => unsupported_operation, |
| 5316 | "BlockingIOError" => vm.ctx.exceptions.blocking_io_error.to_owned(), |
| 5317 | }); |
| 5318 | Ok(()) |
| 5319 | } |
| 5320 | } |
| 5321 | // FileIO requires host environment for filesystem access |
| 5322 | #[cfg(feature = "host_env")] |
nothing calls this directly
no test coverage detected