goodboy / tractor

A distributed, structured concurrent runtime for Python (and friends)
GNU Affero General Public License v3.0
258 stars 12 forks source link

Re-draw `pdbpp` prompt on `SIGINT` #349

Closed goodboy closed 1 year ago

goodboy commented 1 year ago

Fixes a long running issue todo with ctl-c during pdbpp REPL use to ensure that the prompt is always redrawn after log msgs indicating that the SIGINT is being ignored in whatever actor currently owns the TTY lock / is running a REPL.

Also, this resolves the issues (AFAIK) that were preventing us from using the pypi version of pdbpp as mentioned in https://github.com/goodboy/tractor/issues/323. So we should be able to do a working release again 😂 ?

Probably pertains to:

goodboy commented 1 year ago

Lol, so as was my hair ripping ayer, it turns out the behavior of this is quite different depending on the shell in use...

For example the tests are failing right now with bash (as i've verified it manually) with this:

screenshot-2023-01-26_13-57-40

and whereas my issue hacking on this yesterday was that xonsh has some kind of SIGINT handling bug where the examples/debugging/multi_daemon_subactor.py will hang on final root actor teardown if you do the ctlc path (manually) and quickly..

So I guess probably need to force bash when running the tests locally somehow as well as somehow hack this actual UX where we're seeing 2x Pdb++> prompts..