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

gh-131535: Fix stale example in html.parser docs, make examples doctests #131551

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brianschubert
Copy link
Contributor

@brianschubert brianschubert commented Mar 21, 2025

Fixes #131535

Back in Python 3.5, the default for convert_charrefs was changed from False to True. One of the docs examples still assumes the old default of False. This PR updates the example to reflect the current behavior.

Also migrates the examples to doctests to help catch any further discrepancies. Slightly tweaks two examples to avoid relying on trailing whitespace, which isn't visible in the output and makes doctests tricky.

This is a docs-only change, so skip news


📚 Documentation preview 📚: https://cpython-previews--131551.org.readthedocs.build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

html.parser produces different output than documented
1 participant