Skip to content
Discussion options

You must be logged in to vote

I suspect that you installed polars and your own code as separate extension? If so, then you most likely hit a fundamental limitation of how PyO3 currently works. The type objects backing #[pyclass] are stored as statics. Hence, each extension built using PyO3 has their own type objects and specifically the type object backing PyExpr in your extension and in the prebuilt polar extension you installed are equal but not identical which explain the strange error message you are getting.

Note that while the statically stored type objects are the current blocker, this whole issue not easy to resolve due to the lack of ABI stability for Rust generally. I.e. even if your extension and the polars…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@adamreichold
Comment options

@sun-rs
Comment options

@nikita240
Comment options

@mejrs
Comment options

mejrs Sep 1, 2023
Collaborator

@adamreichold
Comment options

Answer selected by sun-rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants