Repository navigation
BUG: implement flush() and isatty() on _DummyFile - #19594
Merged
Merged
Conversation
The dummy stream object used by astropy.utils.misc.silence() to replace sys.stdout and sys.stderr only implemented write(). Libraries that probe the stream at import time (IPython 9.13's IPython.core.kitty calls sys.stdout.isatty() at module import) therefore raised AttributeError when imported under silence() -- which is the case during astropy.config.generate_config, triggering Sphinx build failures on RTD. Make _DummyFile satisfy more of the file protocol so it is a safe drop-in for real streams. The changelog fragment uses a placeholder name; rename to the PR number before merge.
Contributor
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
Member
Author
|
In order to get RTD building again, I am going to merge this |
astrofrog
added a commit
that referenced
this pull request
Apr 24, 2026
astrofrog
added a commit
that referenced
this pull request
Apr 24, 2026
…594-on-v7.2.x Backport PR #19594 on branch v7.2.x (BUG: implement flush() and isatty() on _DummyFile)
This was referenced Apr 27, 2026
Member
|
Thanks for handling this! Belatedly... could the original problem be related to #18153 ? |
Member
Author
|
I’m not sure, it looks similar but the issue here would have happened anyway even without that other PR |
1 task
Member
|
Upstream patch is merged. Do we have to follow-up here? |
Member
Author
|
No I think we can just keep as is here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IPython now expects
isatty()onsys.stdout– hopefully this should fix the RTD build