abhiaagarwal commented on code in PR #5566:
URL: https://github.com/apache/arrow-rs/pull/5566#discussion_r1546818013


##########
arrow/src/pyarrow.rs:
##########
@@ -101,15 +106,19 @@ impl<T: ToPyArrow> IntoPyArrow for T {
     }
 }
 
-fn validate_class(expected: &str, value: &PyAny) -> PyResult<()> {
-    let pyarrow = PyModule::import(value.py(), "pyarrow")?;
+fn validate_class(expected: &str, value: &Bound<PyAny>) -> PyResult<()> {
+    let pyarrow = PyModule::import_bound(value.py(), "pyarrow")?;
     let class = pyarrow.getattr(expected)?;
-    if !value.is_instance(class)? {
-        let expected_module = class.getattr("__module__")?.extract::<&str>()?;
-        let expected_name = class.getattr("__name__")?.extract::<&str>()?;
+    if !value.is_instance(&class)? {
+        let expected_module = class.getattr("__module__")?;
+        let expected_module = expected_module.extract::<&str>()?;
+        let expected_name = class.getattr("__name__")?;
+        let expected_name = expected_name.extract::<&str>()?;
         let found_class = value.get_type();
-        let found_module = 
found_class.getattr("__module__")?.extract::<&str>()?;
-        let found_name = found_class.getattr("__name__")?.extract::<&str>()?;
+        let found_module = found_class.getattr("__module__")?;
+        let found_module = found_module.extract::<&str>()?;
+        let found_name = found_class.getattr("__name__")?;
+        let found_name = found_name.extract::<&str>()?;

Review Comment:
   Okay, a bit of digging, and a public `extract` actually does still exist, 
but it's been redirected to `extract_bound`. 
https://github.com/PyO3/pyo3/blob/c1f11fb4bddc836f820e0db3db514b4742b8a3e7/src/types/any.rs#L805
   
   I have no clue what's causing my build to freak out 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to