Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin expressions don't handle keyboard interrupts (CTRL+C) #127

Open
sclamons opened this issue Jan 10, 2025 · 0 comments
Open

Plugin expressions don't handle keyboard interrupts (CTRL+C) #127

sclamons opened this issue Jan 10, 2025 · 0 comments

Comments

@sclamons
Copy link

Long-running plugin expressions can hog the terminal and can't be interrupted by keyboard interrupt. This is a known phenomenon with PyO3: https://pyo3.rs/v0.23.3/faq.html. Recommended practice is for long-running functions to occasionally call Python::check_signals(), which lets the Python interpreter check for SIGINT and other signals; but I can't find a way to do that from a Polars plugin, where you don't typically have access to a Python object.

It would be really nice for PyO3-polars to handle SIGINT checking behind the scenes. Barring that, can we somehow allow access to the Python object that ultimately gets used in the call? If there's already a way to do this, it needs to be documented (or documented better).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant