You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't understand why this doesn't work. It is very similar to map_mul of py-polars. With only exception that map_mul is a #[pyfunction].
Installed versions
Finally, Cargo.toml:
[lib]
name = "pyo3issue"# "cdylib" is necessary to produce a shared library for Python to import from.crate-type = ["cdylib"]
[dependencies]
polars = { version = "0.28.0", features = [
"lazy"
] }
pyo3-polars = "0.2.0"polars-arrow = "0.28.0"
[dependencies.pyo3]
version = "0.18.0"# "abi3-py37" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.7features = ["abi3-py37"]
The text was updated successfully, but these errors were encountered:
AnatolyBuga
changed the title
Execution (python) hangs when function of Expr::AnonymousFunction points to python code
PyO3+Polars Expr::AnonymousFunction: Execution (python) hangs when function points to python code
Apr 6, 2023
may be I would be able to achieve converting python functions into UDFs with #6325
AnatolyBuga
changed the title
PyO3+Polars Expr::AnonymousFunction: Execution (python) hangs when function points to python code
PyO3+Polars Expr::AnonymousFunction: Execution (python) deadlocks when function points to python code
Apr 7, 2023
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
Updated MRE
I'd like users to define functions in python to be converted into Expr(Anonymous functions) for later use.
However, as soon as I introduce a call to
Python::with_gil
from inside an AnonymousFunction - the interprete just hangsAny thoughts would be much appreciated.
Reproducible example
!!! Python side, the code I am executing:
Expected behavior
I don't understand why this doesn't work. It is very similar to
map_mul
ofpy-polars
. With only exception that map_mul is a#[pyfunction]
.Installed versions
Finally,
Cargo.toml
:The text was updated successfully, but these errors were encountered: