@@ -435,54 +435,54 @@ impl<T, E: Into<PyRingKernelError>> IntoPyResult<T> for Result<T, E> {
435435/// Register exception types with the Python module.
436436pub fn register_exceptions ( py : Python < ' _ > , m : & Bound < ' _ , PyModule > ) -> PyResult < ( ) > {
437437 // Create exceptions module
438- let exceptions = PyModule :: new_bound ( py, "exceptions" ) ?;
438+ let exceptions = PyModule :: new ( py, "exceptions" ) ?;
439439
440440 // Add base exception
441- exceptions. add ( "RingKernelError" , py. get_type_bound :: < RingKernelError > ( ) ) ?;
441+ exceptions. add ( "RingKernelError" , py. get_type :: < RingKernelError > ( ) ) ?;
442442
443443 // Memory errors
444- exceptions. add ( "MemoryLimitError" , py. get_type_bound :: < MemoryLimitError > ( ) ) ?;
444+ exceptions. add ( "MemoryLimitError" , py. get_type :: < MemoryLimitError > ( ) ) ?;
445445
446446 // Kernel errors
447- exceptions. add ( "KernelError" , py. get_type_bound :: < KernelError > ( ) ) ?;
448- exceptions. add ( "KernelStateError" , py. get_type_bound :: < KernelStateError > ( ) ) ?;
447+ exceptions. add ( "KernelError" , py. get_type :: < KernelError > ( ) ) ?;
448+ exceptions. add ( "KernelStateError" , py. get_type :: < KernelStateError > ( ) ) ?;
449449
450450 // CUDA errors
451- exceptions. add ( "CudaError" , py. get_type_bound :: < CudaError > ( ) ) ?;
452- exceptions. add ( "CudaDeviceError" , py. get_type_bound :: < CudaDeviceError > ( ) ) ?;
453- exceptions. add ( "CudaMemoryError" , py. get_type_bound :: < CudaMemoryError > ( ) ) ?;
451+ exceptions. add ( "CudaError" , py. get_type :: < CudaError > ( ) ) ?;
452+ exceptions. add ( "CudaDeviceError" , py. get_type :: < CudaDeviceError > ( ) ) ?;
453+ exceptions. add ( "CudaMemoryError" , py. get_type :: < CudaMemoryError > ( ) ) ?;
454454
455455 // Queue errors
456- exceptions. add ( "QueueError" , py. get_type_bound :: < QueueError > ( ) ) ?;
457- exceptions. add ( "QueueFullError" , py. get_type_bound :: < QueueFullError > ( ) ) ?;
458- exceptions. add ( "QueueEmptyError" , py. get_type_bound :: < QueueEmptyError > ( ) ) ?;
456+ exceptions. add ( "QueueError" , py. get_type :: < QueueError > ( ) ) ?;
457+ exceptions. add ( "QueueFullError" , py. get_type :: < QueueFullError > ( ) ) ?;
458+ exceptions. add ( "QueueEmptyError" , py. get_type :: < QueueEmptyError > ( ) ) ?;
459459
460460 // K2K errors
461- exceptions. add ( "K2KError" , py. get_type_bound :: < K2KError > ( ) ) ?;
462- exceptions. add ( "K2KDeliveryError" , py. get_type_bound :: < K2KDeliveryError > ( ) ) ?;
461+ exceptions. add ( "K2KError" , py. get_type :: < K2KError > ( ) ) ?;
462+ exceptions. add ( "K2KDeliveryError" , py. get_type :: < K2KDeliveryError > ( ) ) ?;
463463
464464 // Benchmark errors
465- exceptions. add ( "BenchmarkError" , py. get_type_bound :: < BenchmarkError > ( ) ) ?;
465+ exceptions. add ( "BenchmarkError" , py. get_type :: < BenchmarkError > ( ) ) ?;
466466
467467 // Hybrid errors
468- exceptions. add ( "HybridError" , py. get_type_bound :: < HybridError > ( ) ) ?;
468+ exceptions. add ( "HybridError" , py. get_type :: < HybridError > ( ) ) ?;
469469 exceptions. add (
470470 "GpuNotAvailableError" ,
471- py. get_type_bound :: < GpuNotAvailableError > ( ) ,
471+ py. get_type :: < GpuNotAvailableError > ( ) ,
472472 ) ?;
473473
474474 // Resource errors
475- exceptions. add ( "ResourceError" , py. get_type_bound :: < ResourceError > ( ) ) ?;
476- exceptions. add ( "ReservationError" , py. get_type_bound :: < ReservationError > ( ) ) ?;
475+ exceptions. add ( "ResourceError" , py. get_type :: < ResourceError > ( ) ) ?;
476+ exceptions. add ( "ReservationError" , py. get_type :: < ReservationError > ( ) ) ?;
477477
478478 // Add exceptions module to main module
479479 m. add_submodule ( & exceptions) ?;
480480
481481 // Also add commonly-used exceptions at top level
482- m. add ( "RingKernelError" , py. get_type_bound :: < RingKernelError > ( ) ) ?;
483- m. add ( "CudaError" , py. get_type_bound :: < CudaError > ( ) ) ?;
484- m. add ( "KernelError" , py. get_type_bound :: < KernelError > ( ) ) ?;
485- m. add ( "MemoryLimitError" , py. get_type_bound :: < MemoryLimitError > ( ) ) ?;
482+ m. add ( "RingKernelError" , py. get_type :: < RingKernelError > ( ) ) ?;
483+ m. add ( "CudaError" , py. get_type :: < CudaError > ( ) ) ?;
484+ m. add ( "KernelError" , py. get_type :: < KernelError > ( ) ) ?;
485+ m. add ( "MemoryLimitError" , py. get_type :: < MemoryLimitError > ( ) ) ?;
486486
487487 Ok ( ( ) )
488488}
0 commit comments