gh-131535: Fix stale example in html.parser docs, make examples doctests#131551
Merged
serhiy-storchaka merged 4 commits intopython:mainfrom May 7, 2025
Merged
Conversation
serhiy-storchaka
approved these changes
May 7, 2025
|
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 |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 7, 2025
… 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. |
brianschubert
added a commit
to brianschubert/cpython
that referenced
this pull request
May 7, 2025
…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. |
serhiy-storchaka
pushed a commit
that referenced
this pull request
May 7, 2025
serhiy-storchaka
pushed a commit
that referenced
this pull request
May 7, 2025
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #131535
Back in Python 3.5, the default for
convert_charrefswas changed fromFalsetoTrue. 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/