Skip to content

gh-111735: Skip turtle doctests when _tkinter is not available - #156417

Merged
StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:turtle/fix-doctests
Aug 27, 2026
Merged

gh-111735: Skip turtle doctests when _tkinter is not available#156417
StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:turtle/fix-doctests

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Aug 26, 2026

Copy link
Copy Markdown
Member

Most of these were fixed by 859c068, I presume these were added after when the CI built with tkinter so it wasn't caught.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34241299 | 📁 Comparing 864063d against main (f54fd2a)

  🔍 Preview build  

1 file changed
± library/turtle.html

@terryjreedy

Copy link
Copy Markdown
Member

My comments on the previous PR might or might not apply. I have not interacted with doctests since then.

@StanFromIreland

Copy link
Copy Markdown
Member Author

I saw your previous comments @terryjreedy , and I don't think that they apply here.

@terryjreedy

Copy link
Copy Markdown
Member

After 859c068 Doc/conf.py:24 sets _tkinter to None after import failure. To detect a future regression in local testing, should we add a CI or buildbot test that patches conf.py to _tkinter = None and then runs Sphinx doctest on turtle.rst?

@StanFromIreland

Copy link
Copy Markdown
Member Author

To detect a future regression in local testing, should we add a CI or buildbot test that patches conf.py to _tkinter = None and then runs Sphinx doctest on turtle.rst?

I think we can leave this to a separate PR. We don't currently have any Buildbots that run any form of docs build, so this would need quite a bit of work in buildmaster-config, as well as someone to sponsor the machine it will run on. Adding it to the CI is also possible. But to be honest, I'm not sure there's a real benefit. Only we (CPython developers) run the doctests, and when we do it's usually with tkinter. I don't think the cost justify protecting against regressions here.

@StanFromIreland StanFromIreland added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 27, 2026
@StanFromIreland
StanFromIreland merged commit eb08902 into python:main Aug 27, 2026
46 checks passed
@StanFromIreland
StanFromIreland deleted the turtle/fix-doctests branch August 27, 2026 13:53
@miss-islington-app

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 27, 2026

Copy link
Copy Markdown

GH-156470 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 27, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker eb089020696e451e64a51534726efa80dcbdc902 3.13

@bedevere-app

bedevere-app Bot commented Aug 27, 2026

Copy link
Copy Markdown

GH-156471 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 27, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Aug 27, 2026
hugovk pushed a commit that referenced this pull request Aug 27, 2026
…able (GH-156417) (#156471)

Co-authored-by: Stan Ulbrych <stan@python.org>
hugovk pushed a commit that referenced this pull request Aug 27, 2026
…able (GH-156417) (#156470)

Co-authored-by: Stan Ulbrych <stan@python.org>
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 needs backport to 3.13 bugs and security fixes skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants