tox icon indicating copy to clipboard operation
tox copied to clipboard

tox4: (regression) unable to run interactive commands

Open ssbarnea opened this issue 2 years ago • 2 comments

While with tox 3 it was possible to start interactive commands as shells, with tox4 this is no longer possible because apparently there is some buffering implied which has two side effects:

  • Output not displayed until a new line is send, so login: prompt would not be seen
  • What you type is not displayed

I tried setting PYTHONUNBUFFERED=1 but it has no effect.

If you happened to had a tox env that runs docker run -it container-name /bin/bash, debugging would become close to impossible with tox4.

ssbarnea avatar Mar 09 '22 16:03 ssbarnea

PRs to address this are welcome, note though this likely is a very hard PR. I'll mark it not important enough though to block release. Furthermore, your report is missing many required information: OS and console manager you're using, for example, project. This should work (mostly) on Linux, I've tried with PDB/breakpoint, not sure how much docker differs. Might be related to https://github.com/tox-dev/tox/issues/1773

gaborbernat avatar Mar 09 '22 18:03 gaborbernat

I will try to narrow it down tomorrow. I wondered myself because I do remember being able to use pdb too, so it might not really be a general problem that breaks all interactive consoles.

tx

ssbarnea avatar Mar 09 '22 18:03 ssbarnea

this likely is a very hard PR

still a work in progress, but I think this PR will address this issue.

masenf avatar Dec 14 '22 10:12 masenf

I think that the interactivity issue is not generalized because I think that pdb and ipdb are still working... or I need to double check. It would quite sad to not be able to do tox -e py -- -s --pdb.

ssbarnea avatar Dec 14 '22 10:12 ssbarnea

@ssbarnea this should be fixed on posix platforms as of tox 4.0.12 please try again and reopen if you still face issues running interactive commands.

For Windows specifically, we are tracking pty support with #2337, but likely not happening any time soon.

masenf avatar Jan 19 '23 11:01 masenf