diff --git a/stdlib/src/csv.rs b/stdlib/src/csv.rs index a0c497a9f..f89238ed1 100644 --- a/stdlib/src/csv.rs +++ b/stdlib/src/csv.rs @@ -32,7 +32,7 @@ mod _csv { #[pyattr(name = "Error")] fn error(vm: &VirtualMachine) -> PyTypeRef { - PyType::new_simple_ref("Error", &vm.ctx.exceptions.exception_type).unwrap() + PyType::new_simple_ref("_csv.Error", &vm.ctx.exceptions.exception_type).unwrap() } #[pyfunction] diff --git a/stdlib/src/ssl.rs b/stdlib/src/ssl.rs index 248e424ff..8709839d2 100644 --- a/stdlib/src/ssl.rs +++ b/stdlib/src/ssl.rs @@ -181,7 +181,7 @@ mod _ssl { } ERROR .get_or_init(|| { - PyType::new_simple_ref("SSLError", &vm.ctx.exceptions.os_error).unwrap() + PyType::new_simple_ref("ssl.SSLError", &vm.ctx.exceptions.os_error).unwrap() }) .clone() } @@ -195,7 +195,7 @@ mod _ssl { .get_or_init(|| { let ssl_error = ssl_error(vm); PyType::new_ref( - "SSLCertVerificationError", + "ssl.SSLCertVerificationError", vec![ssl_error, vm.ctx.exceptions.value_error.clone()], Default::default(), PyBaseException::make_slots(), @@ -212,7 +212,9 @@ mod _ssl { static ERROR: PyTypeRef; } ERROR - .get_or_init(|| PyType::new_simple_ref("SSLZeroReturnError", &ssl_error(vm)).unwrap()) + .get_or_init(|| { + PyType::new_simple_ref("ssl.SSLZeroReturnError", &ssl_error(vm)).unwrap() + }) .clone() } @@ -222,7 +224,7 @@ mod _ssl { static ERROR: PyTypeRef; } ERROR - .get_or_init(|| PyType::new_simple_ref("SSLWantReadError", &ssl_error(vm)).unwrap()) + .get_or_init(|| PyType::new_simple_ref("ssl.SSLWantReadError", &ssl_error(vm)).unwrap()) .clone() } @@ -232,7 +234,9 @@ mod _ssl { static ERROR: PyTypeRef; } ERROR - .get_or_init(|| PyType::new_simple_ref("SSLWantWriteError", &ssl_error(vm)).unwrap()) + .get_or_init(|| { + PyType::new_simple_ref("ssl.SSLWantWriteError", &ssl_error(vm)).unwrap() + }) .clone() } @@ -242,7 +246,7 @@ mod _ssl { static ERROR: PyTypeRef; } ERROR - .get_or_init(|| PyType::new_simple_ref("SSLSyscallError", &ssl_error(vm)).unwrap()) + .get_or_init(|| PyType::new_simple_ref("ssl.SSLSyscallError", &ssl_error(vm)).unwrap()) .clone() } @@ -252,7 +256,7 @@ mod _ssl { static ERROR: PyTypeRef; } ERROR - .get_or_init(|| PyType::new_simple_ref("SSLEOFError", &ssl_error(vm)).unwrap()) + .get_or_init(|| PyType::new_simple_ref("ssl.SSLEOFError", &ssl_error(vm)).unwrap()) .clone() } diff --git a/stdlib/src/zlib.rs b/stdlib/src/zlib.rs index 5e0237889..7b79e84b0 100644 --- a/stdlib/src/zlib.rs +++ b/stdlib/src/zlib.rs @@ -56,7 +56,7 @@ mod zlib { #[pyattr] fn error(vm: &VirtualMachine) -> PyTypeRef { - PyType::new_simple_ref("error", &vm.ctx.exceptions.exception_type).unwrap() + PyType::new_simple_ref("zlib.error", &vm.ctx.exceptions.exception_type).unwrap() } /// Compute an Adler-32 checksum of data.