File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,16 @@ num-complex = ">= 0.2, < 0.5"
22
22
num-integer = " 0.1"
23
23
num-traits = " 0.2"
24
24
ndarray = " >= 0.15, < 0.17"
25
- pyo3 = { version = " 0.21 .0" , default-features = false , features = [" macros" ] }
25
+ pyo3 = { version = " 0.22 .0" , default-features = false , features = [" macros" ] }
26
26
rustc-hash = " 1.1"
27
27
28
28
[dev-dependencies ]
29
- pyo3 = { version = " 0.21 .0" , default-features = false , features = [" auto-initialize" ] }
29
+ pyo3 = { version = " 0.22 .0" , default-features = false , features = [" auto-initialize" ] }
30
30
nalgebra = { version = " 0.32" , default-features = false , features = [" std" ] }
31
31
32
32
[package .metadata .docs .rs ]
33
33
all-features = true
34
+
35
+ [features ]
36
+ default = [" gil-refs" ]
37
+ "gil-refs" = [" pyo3/gil-refs" ]
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ impl TypeDescriptors {
243
243
}
244
244
} ;
245
245
246
- dtype. clone ( ) . into_bound ( py )
246
+ dtype. bind ( py ) . to_owned ( )
247
247
}
248
248
}
249
249
Original file line number Diff line number Diff line change @@ -825,6 +825,7 @@ mod tests {
825
825
use super :: * ;
826
826
827
827
use pyo3:: { py_run, types:: PyTypeMethods } ;
828
+ use pyo3:: types:: PyString ;
828
829
829
830
use crate :: npyffi:: { is_numpy_2, NPY_NEEDS_PYAPI } ;
830
831
@@ -851,7 +852,7 @@ mod tests {
851
852
852
853
#[ test]
853
854
fn test_dtype_names ( ) {
854
- fn type_name < ' py , T : Element > ( py : Python < ' py > ) -> String {
855
+ fn type_name < T : Element > ( py : Python ) -> Bound < PyString > {
855
856
dtype_bound :: < T > ( py) . typeobj ( ) . qualname ( ) . unwrap ( )
856
857
}
857
858
Python :: with_gil ( |py| {
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ impl TypeDescriptors {
191
191
}
192
192
} ;
193
193
194
- dtype. clone ( ) . into_bound ( py )
194
+ dtype. bind ( py ) . to_owned ( )
195
195
}
196
196
}
197
197
You can’t perform that action at this time.
0 commit comments