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

ConsoleZ does not show report colors #2337

Open
margars opened this issue Feb 2, 2022 · 5 comments
Open

ConsoleZ does not show report colors #2337

margars opened this issue Feb 2, 2022 · 5 comments
Labels
area:commands-execution bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. level:hard rought estimate that this might be quite hard to implement os:windows

Comments

@margars
Copy link

margars commented Feb 2, 2022

When tox4 is executed from PowerShell (5) on Windows (10), the color output from mypy/pytest is not displayed correctly. The same issue is also observed when using CMD. On the same environment running tox 3 produces output as expected.

Here is an example (tox4):
image

tox3 example:
image

The final message is displayed correctly (tox4):
image

@margars margars added the bug:normal affects many people or has quite an impact label Feb 2, 2022
@ssbarnea
Copy link
Member

ssbarnea commented Feb 6, 2022

This problem is not limited to Windows and its caused by loss of tty status when tox is run. For example it also affects ansible and docker command lines.

@ssbarnea ssbarnea added this to the 4.0 milestone Feb 6, 2022
@gaborbernat
Copy link
Member

@ssbarnea no this is something different. What you're talking about is handled by #1773. The part I'm missing here is why is [35m displayed above in the terminal rather than rendered as color.

@gaborbernat gaborbernat changed the title tox4: mypy/pytest color output is not displayed correctly on Windows tox4: ConsoleZ does not show report colors Feb 7, 2022
@gaborbernat
Copy link
Member

@margars please post the project you're using to replicate this and the terminal (with version) you're running in.

@margars
Copy link
Author

margars commented Feb 7, 2022

Initially I observed the issue with ConsoleZ, but later I tried using Windows default PowerShell and CMD, in all cases the output is not displayed correctly. My project is restricted by company policies, cannot post it.

@gaborbernat gaborbernat modified the milestones: 4.0, 4.1 Nov 20, 2022
@gaborbernat gaborbernat changed the title tox4: ConsoleZ does not show report colors ConsoleZ does not show report colors Dec 2, 2022
@gaborbernat gaborbernat added the help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. label Dec 8, 2022
@masenf masenf added the level:hard rought estimate that this might be quite hard to implement label Jan 19, 2023
@masenf
Copy link
Collaborator

masenf commented Jan 19, 2023

I marked this one hard, because doing true pty emulation on Windows is not a well trod path.

However, it might be possible to use the tox3 behavior of not passing file handles to subprocess stdout/stderr. Normally, this would break command logging, but maybe instead some windows-specific API might be used to read/spy the child process console streams, so they wouldn't have to be redirected at the subprocess layer. This kind of implementation could be simpler than pty if logging output is the only reason to have pty emulation.

@gaborbernat gaborbernat removed this from the P-1 milestone Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:commands-execution bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. level:hard rought estimate that this might be quite hard to implement os:windows
Projects
None yet
Development

No branches or pull requests

5 participants