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

feat: Improved support for KeyboardInterrupts #20961

Merged
merged 13 commits into from
Jan 29, 2025

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Jan 28, 2025

We now install a signal handler that detects when ctrl+c is pressed, and if so causes try_raise_keyboard_interrupt() calls we should spread through the codebase to panic with KeyboardInterrupt. This panic should be caught right before returning to Python (by wrapping code that call Polars with py.enter_polars) and turned it into a proper KeyboardInterrupt exception.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jan 28, 2025
@ritchie46 ritchie46 merged commit ba37f11 into pola-rs:main Jan 29, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants