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
Regression in terminal color auto-detection? #11675
Comments
From commit d3c91f9, four months ago (I think it's still between 7.0 and 7.1): https://github.com/sphinx-doc/sphinx/blob/master/sphinx/util/display.py#L44-L55 It's quite hard to bisect (even more on a phone...) so I suggest testing with a patched version of Sphinx to check if it works (technically, this commit could be reverted without too much work I think, to confirm the bug. If it's the culprit, we can first check if ANSI esc sequences are supported or not (especially the clear line ( cc @humitos |
@mgeier (or anyone else) Do you think you can work out some PR? (otherwise I'll have a look in mid October). |
@humitos do you have a link to where RTD does the log streaming please? You're right this is likely a problem with TTY detection or similar in Sphinx, just want to be able to replicate what RTD is doing on your side. A |
The code that executes the command is at https://github.com/readthedocs/readthedocs.org/blob/a5052deea15c252179518432bcae4042b1684bc8/readthedocs/doc_builder/environments.py#L297-L357. It uses Docker behind the scenes, so may not be super easy to reproduce the same behavior. |
I spun up a Read the Docs instance locally and I ran some build tests. I found the problem was introduced in The changes between those releases are: v7.0.1...v7.1.0 |
I reverted this commit and try installing 7.2.5 with this commit reverted and the issue persists. So, there is something else that's breaking the terminal. Edit: after |
I'm doing a |
You are right. This is the bad commit 🎉 |
Sorry, I currently do not have time to look into this. |
Describe the bug
I'm not sure if this is caused by Sphinx or readthedocs.org, but when using Sphinx 7.1 and 7.2 on RTD, the log (which doesn't support color) contains some partial ANSI escape sequences like
[2K
.See readthedocs/readthedocs.org#10702 for details.
How to Reproduce
Push to RTD using Sphinx >= 7.1 and look at the logs.
Environment Information
Sphinx extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: