pyo3 icon indicating copy to clipboard operation
pyo3 copied to clipboard

adding new getter for type obj

Open Cheukting opened this issue 1 year ago • 1 comments

Adding new getter that works like __mro__ and __bases__ in Python.

closes #4192

Cheukting avatar May 21 '24 15:05 Cheukting

Got it, seems we will roll back to the unsafe way to do it, right? @davidhewitt I will update this PR soon.

Cheukting avatar May 22 '24 18:05 Cheukting

Failure looks genuine:

  error: the item `FfiPtrExt` is imported redundantly
     --> src/types/typeobject.rs:163:17
      |
  3   | use crate::ffi_ptr_ext::FfiPtrExt;
      |     ----------------------------- the item `FfiPtrExt` is already imported here
  ...
  163 |             use crate::ffi_ptr_ext::FfiPtrExt;
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: `-D unused-imports` implied by `-D warnings`
  
  error: could not compile `pyo3` due to previous error

... seems like some of the FfiPtrExtr imports lower down in this file can probably just be removed now that we've added an import up the top.

davidhewitt avatar May 24 '24 14:05 davidhewitt

Thanks for implementing!

Hooksie avatar May 24 '24 15:05 Hooksie

@davidhewitt thanks! Will have a look at the unused imports

Cheukting avatar May 24 '24 15:05 Cheukting

Adding some really small feedback on the expect message. Feel free to disregard if it's not important

Hooksie avatar May 24 '24 15:05 Hooksie

Thank you @Hooksie

Cheukting avatar May 24 '24 16:05 Cheukting