@@ -13,7 +13,7 @@ impl PythonBridge {
1313
1414 pub fn initialize ( & mut self ) -> Result < ( ) > {
1515 Python :: with_gil ( |py| {
16- let sys = py. import_bound ( "sys" ) ?;
16+ let sys = py. import ( "sys" ) ?;
1717 let path_attr = sys. getattr ( "path" ) ?;
1818 let path = path_attr. downcast :: < PyList > ( ) ?;
1919
@@ -36,7 +36,7 @@ impl PythonBridge {
3636 }
3737
3838 Python :: with_gil ( |py| {
39- let nexum_ai = PyModule :: import_bound ( py, "nexum_ai.optimizer" ) ?;
39+ let nexum_ai = PyModule :: import ( py, "nexum_ai.optimizer" ) ?;
4040 let semantic_cache = nexum_ai. getattr ( "SemanticCache" ) ?;
4141 let cache_instance = semantic_cache. call0 ( ) ?;
4242
@@ -51,7 +51,7 @@ impl PythonBridge {
5151
5252 pub fn test_integration ( & self ) -> Result < String > {
5353 Python :: with_gil ( |py| {
54- let nexum_ai = PyModule :: import_bound ( py, "nexum_ai.optimizer" ) ?;
54+ let nexum_ai = PyModule :: import ( py, "nexum_ai.optimizer" ) ?;
5555 let test_func = nexum_ai. getattr ( "test_vectorization" ) ?;
5656 let result = test_func. call0 ( ) ?;
5757 let result_str: String = result. str ( ) ?. extract ( ) ?;
@@ -72,7 +72,7 @@ impl SemanticCache {
7272 bridge. initialize ( ) ?;
7373
7474 let cache = Python :: with_gil ( |py| {
75- let nexum_ai = PyModule :: import_bound ( py, "nexum_ai.optimizer" ) ?;
75+ let nexum_ai = PyModule :: import ( py, "nexum_ai.optimizer" ) ?;
7676 let semantic_cache_class = nexum_ai. getattr ( "SemanticCache" ) ?;
7777 let cache_instance = semantic_cache_class. call0 ( ) ?;
7878 Ok :: < PyObject , PyErr > ( cache_instance. unbind ( ) )
@@ -121,7 +121,7 @@ impl NLTranslator {
121121 bridge. initialize ( ) ?;
122122
123123 let translator = Python :: with_gil ( |py| {
124- let nexum_ai = PyModule :: import_bound ( py, "nexum_ai.translator" ) ?;
124+ let nexum_ai = PyModule :: import ( py, "nexum_ai.translator" ) ?;
125125 let translator_class = nexum_ai. getattr ( "NLTranslator" ) ?;
126126 let translator_instance = translator_class. call0 ( ) ?;
127127 Ok :: < PyObject , PyErr > ( translator_instance. unbind ( ) )
@@ -152,7 +152,7 @@ mod tests {
152152 fn check_python_available ( ) -> bool {
153153 let mut bridge = PythonBridge :: new ( ) . unwrap ( ) ;
154154 bridge. initialize ( ) . is_ok ( )
155- && Python :: with_gil ( |py| PyModule :: import_bound ( py, "nexum_ai.optimizer" ) . is_ok ( ) )
155+ && Python :: with_gil ( |py| PyModule :: import ( py, "nexum_ai.optimizer" ) . is_ok ( ) )
156156 }
157157
158158 #[ test]
0 commit comments