Pin blessed < 1.40.0 - #816
Conversation
Starting from blessed 1.40.0, Terminal.__init__ queries the terminal's capabilities via an XTGETTCAP escape sequence and blocks reading the response. This runs as a side effect of merely importing inquirer (control.py imports it at module scope). warnet pins inquirer==3.4.0, but inquirer doesn't pin its own dependency on blessed, so a fresh install always resolves to whatever blessed release is newest at install time. warnet deploy spawns one multiprocessing.Process per tank. In macOS deployments this becomes a problem, given multiprocessing's default start method is "spawn". When running `warnet deploy` in macOS, each spawned task will re-execute the whole warnet import tree, re-triger the inquirer import and run the blocking terminal query.
|
My laptop got fried last week and I've been slowly working towards getting my new setup up to speed. Run into this today when trying to re-deploy warnet. I'm guessing I didn't run into this earlier as blessed may have been pulled by inquirer before it got updated to 1.40.0 |
|
I tried to reproduce, installing master as a "fresh install" with I got the latest version of blessed: ... but didn't have any problems deploying a network (on macos). I wonder if what you're seeing is from another package? Here's my list inside the warnet venv: |
|
also, python 3.14.5 |
|
Just re-tested this. After This is with This even happens with small networks. Some time at the beginning of the deployment, some times half way through it, and the only way to keep it going is by "hitting enter". |
|
Got it yep, reproduced the bug and confirmed the fix. GRACIAS |
|
Gracias a ti amigo 💃 |
Starting from blessed 1.40.0, Terminal.init queries the terminal's capabilities via an XTGETTCAP escape sequence and blocks reading the response. This runs as a side effect of merely importing inquirer (control.py imports it at module scope).
warnet pins inquirer==3.4.0, but inquirer doesn't pin its own dependency on blessed, so a fresh install always resolves to whatever blessed release is newest at install time.
warnet deploy spawns one multiprocessing.Process per tank. In macOS deployments this becomes a problem, given multiprocessing's default start method is "spawn". When running
warnet deployin macOS, each spawned task will re-execute the whole warnet import tree, re-triger the inquirer import and run the blocking terminal query.