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

GHA: Don't hide doctest output #95436

Merged
merged 7 commits into from
Jul 30, 2022
Merged

GHA: Don't hide doctest output #95436

merged 7 commits into from
Jul 30, 2022

Conversation

zware
Copy link
Member

@zware zware commented Jul 29, 2022

With -q, we don't get any real results from running the doctests.

erlend-aasland
erlend-aasland previously approved these changes Jul 29, 2022
@erlend-aasland
Copy link
Contributor

This should be backported through the security branches.

@erlend-aasland
Copy link
Contributor

On a second though, I'm not sure this is a good idea; previously we'd easily see the deprecation warnings that appear throughout the doctest suite. Now, we need to scroll a lot to see them.

@erlend-aasland erlend-aasland dismissed their stale review July 29, 2022 14:23

Unsure about the change

@zware
Copy link
Member Author

zware commented Jul 29, 2022

On a second though, I'm not sure this is a good idea; previously we'd easily see the deprecation warnings that appear throughout the doctest suite. Now, we need to scroll a lot to see them.

That's a point. I was going to suggest that we could set PYTHONWARNINGS=error for doctest, but that currently prevents it from running at all due to babel's dependence on cgi.parse_header.

@ambv
Copy link
Contributor

ambv commented Jul 29, 2022

If we wait for Babel 2.11, it got rid of the cgi dependency:
python-babel/babel#873

In this case I think setting PYTHONWARNINGS=error for doctest makes perfect sense.

However, we wouldn't be able to backport this beyond 3.10 I think as the sec-only versions have quite outdated documentation dependencies otherwise.

@zware
Copy link
Member Author

zware commented Jul 30, 2022

I went ahead and fixed (or hid) existing warnings in the doctests and enabled warnings-as-errors via global doctest setup in Doc/conf.py to avoid any current or future warnings in Sphinx or its dependencies.

@zware zware merged commit 8281462 into python:main Jul 30, 2022
@zware zware deleted the gha-noisy-doctests branch July 30, 2022 22:21
@zware
Copy link
Member Author

zware commented Jul 30, 2022

I'm not sure whether this is worth a backport or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants