-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-131535: Fix stale example in html.parser
docs, make examples doctests
#131551
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
Thanks @brianschubert for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry @brianschubert and @serhiy-storchaka, I had trouble checking out the
|
… doctests (pythonGH-131551) (cherry picked from commit ee76e36) Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
GH-133587 is a backport of this pull request to the 3.13 branch. |
…xamples doctests (pythonGH-131551) (cherry picked from commit ee76e36) Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
GH-133589 is a backport of this pull request to the 3.14 branch. |
Fixes #131535
Back in Python 3.5, the default for
convert_charrefs
was changed fromFalse
toTrue
. One of the docs examples still assumes the old default ofFalse
. 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.
📚 Documentation preview 📚: https://cpython-previews--131551.org.readthedocs.build/