Skip to content

stubtest_third_party.py, mypy_test.py: just print everything to stdout#11809

Merged
AlexWaygood merged 2 commits intopython:mainfrom
AlexWaygood:no-stderr-printing
Apr 22, 2024
Merged

stubtest_third_party.py, mypy_test.py: just print everything to stdout#11809
AlexWaygood merged 2 commits intopython:mainfrom
AlexWaygood:no-stderr-printing

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

In GitHub Actions, all stderr appears above stdout, even if things are printed to stdout chronologically earlier than being printed to stderr. That is, if you have something like

print("foo")
print("bar", file=sys.stderr)

The output in GitHub Actions will be

bar
foo

Recent changes I made to stubtest_third_party.py made the output go funny because some things were being printed to stderr in CI and some things to stdout. I fixed most of that in #11799, but not all of it (the output still isn't quite right in https://github.com/python/typeshed/actions/runs/8776498752), and now the output of mypy_test.py is all screwed up because of that fix (https://github.com/python/typeshed/actions/runs/8782468512/job/24096628717?pr=11808).

I think it's easier if we just print everything to stdout rather than passing file=sys.stderr anywhere, because if you forget to do it in one place then you end up with bizarre output in CI. Ideally some of this information would be going to stderr rather than stdout, but I don't think it matters that much for our purposes; mostly our scripts are just keeping us up to date with where they're at.

@AlexWaygood AlexWaygood merged commit 1a86b3b into python:main Apr 22, 2024
@AlexWaygood AlexWaygood deleted the no-stderr-printing branch April 22, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants