Skip to content

Conversation

@MusicalNinjaDad
Copy link

@MusicalNinjaDad MusicalNinjaDad commented Mar 9, 2024

Rationale

While core python uses reStructuredText, many packages maintain their documentation in markdown.
Doctest is currently unable to run against markdown files, or docstrings which use markdown to improve in-IDE rendering
Closes #116546 - see for full details.

Code change

Adjusted the regex used in doctest.DocTestParser to also consider ``` to signify the end of an example block (in addition to a blank line and >>>).

Dev Guide expectations

  • change made against main branch, not suitable for a patch release
  • PEP8 followed
  • No backwards compatibility issues
  • test cases created in the style of pre-existing cases
  • all tests pass ./python -m test
  • documentation updated
  • make patchcheck

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

@ghost
Copy link

ghost commented Mar 9, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Mar 9, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

blurb-it bot and others added 3 commits March 9, 2024 15:21
@picnixz
Copy link
Member

picnixz commented Oct 3, 2025

Closing this as being "not planned" for now (see #116546 (comment)).

@picnixz picnixz closed this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctest cannot be used to test markdown files.

2 participants