Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #33428: prompt_toolkit 3.0.25+ breaks Ctrl-C
For the record, Ctrl-C is broken starting with version 3.0.25 of prompt_toolkit (current version 3.0.28 still broken, sage-the- distribution bundles 3.0.22 so it's ok). {{{ $ xbps-query -s python3-prompt_toolkit [*] python3-prompt_toolkit-3.0.28_1 Python3 library for building powerful interactive command lines $ sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.5, Release Date: 2022-01-30 │ │ Using Python 3.10.2. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ sage: factor(54853908712446157179434453567343931596301333824416758692208 077566613224454501131209) ^C^C^C^C }}} If one waits the half hour or so that it takes to factor the number above, then the `^C` gets through, but waiting kind of defeats the purpose of hitting `^C`. This is not specific to factoring -- anything that depends on cysignals for Ctrl-C working is broken. Upstream issue: https://github.com/prompt-toolkit/python-prompt- toolkit/issues/1576 In the GH issue there are two different fixes suggested (with patches), IMHO the second one is better for sage (the downside is that introduces a dependency on cysignals, but sage already depends on cysignals). No action is needed now, but one of the patches will be necessary if/when prompt_toolkit is updated, or for distro packages on systems with a recent version of prompt_toolkit (void linux issue and discussion in void-linux/void-packages#35730) URL: https://trac.sagemath.org/33428 Reported by: tornaria Ticket author(s): Matthias Koeppe Reviewer(s): John Palmieri
- Loading branch information