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

Hotfix to allow Ctrl+C in python scipts #3285

Merged
merged 3 commits into from
May 3, 2024

Conversation

Klaim
Copy link
Member

@Klaim Klaim commented Apr 30, 2024

Partial fix for #3271 , in particular this makes the script in that issue work.

While there are major issues with the signal handling implementation in libmamba (and the fact that ideally it should be a cancelling system with async high-level functions being cancellable, and then scripts/executables decide how to trigger that cancelling), this only helps if Context.use_default_signal_handler(False) (or the equivalent in C++) is used.
That function had no effect before this PR because the boolean it sets was only taken into account at the construction of the Context instance, which necessarilly must happen before the function can be called. To make it effective I (with the help of @Hind-M ) just made sure that the meaning of the variable is re-applied when the function is set. This might break some usage once called, not sure.
We discussed with @Hind-M and @JohanMabille a future long-term solution for this but it will not come soon so this is the quickest hotfix for now.

@JohanMabille JohanMabille merged commit 69ef891 into mamba-org:main May 3, 2024
32 checks passed
@Hind-M Hind-M mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::bug_fixes For PRs fixing bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants