Skip to content

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

Open
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:turtle/fix-doctests
Open

gh-111735: Skip turtle doctests when _tkinter is not available#156417
StanFromIreland wants to merge 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants