Skip to content

Conversation

ttw225
Copy link
Contributor

@ttw225 ttw225 commented Oct 2, 2025

Several examples in Doc/library/enum.rst are meant to be runnable as standalone doctest-style blocks. This PR adds the minimal from enum import ... lines so each block runs when copied in isolation.

The current documentation is correct; this change simply improves convenience for newcomers and first-time readers.

Notes

  • The change aims to be minimal and localized to the affected blocks.
  • No NEWS entry should be required (docs-only).

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

@ttw225 ttw225 requested a review from ethanfurman as a code owner October 2, 2025 07:27
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Oct 2, 2025
@python-cla-bot
Copy link

python-cla-bot bot commented Oct 2, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@picnixz
Copy link
Member

picnixz commented Oct 2, 2025

I would have rejected this PR if other examples weren't already written with executability in mind but in this case, we only complete what is incomplete so it is fine.

@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Oct 2, 2025
@ttw225
Copy link
Contributor Author

ttw225 commented Oct 2, 2025

Thanks for the quick review—much appreciated!

I agree. Minimal imports help readers run the examples more easily.

@picnixz picnixz merged commit f3d7fae into python:main Oct 2, 2025
42 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Oct 2, 2025
@miss-islington-app
Copy link

Thanks @ttw225 for the PR, and @picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 2, 2025
…amples (pythonGH-139488)

(cherry picked from commit f3d7fae)

Co-authored-by: Peter <35064951+ttw225@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 2, 2025
…amples (pythonGH-139488)

(cherry picked from commit f3d7fae)

Co-authored-by: Peter <35064951+ttw225@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 2, 2025

GH-139493 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Oct 2, 2025
@bedevere-app
Copy link

bedevere-app bot commented Oct 2, 2025

GH-139494 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 2, 2025
picnixz pushed a commit that referenced this pull request Oct 2, 2025
…xamples (GH-139488) (#139494)

gh-139487: add missing imports for standalone doctest `Enum` examples (GH-139488)
(cherry picked from commit f3d7fae)

Co-authored-by: Peter <35064951+ttw225@users.noreply.github.com>
hugovk pushed a commit that referenced this pull request Oct 2, 2025
…xamples (GH-139488) (#139493)

gh-139487: add missing imports for standalone doctest `Enum` examples (GH-139488)
(cherry picked from commit f3d7fae)

Co-authored-by: Peter <35064951+ttw225@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants