FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-139487: doc(enum): add missing imports for standalone doctest examples by ttw225 · Pull Request #139488 · python/cpython · GitHub

Repository navigation

gh-139487: doc(enum): add missing imports for standalone doctest examples - #139488

Merged
picnixz merged 1 commit into
python:mainfrom
ttw225:doc/improve_enum
Oct 2, 2025
Merged

picnixz merged 1 commit into
python:mainfrom
ttw225:doc/improve_enum

Conversation

ttw225 commented Oct 2, 2025 •
edited by picnixz
Loading

Copy link
Copy Markdown
Contributor

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 requested a review from ethanfurman as a code owner October 2, 2025 07:27
bedevere-app Bot added docs Documentation in the Doc dir skip news labels Oct 2, 2025

python-cla-bot Bot commented Oct 2, 2025 •
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

picnixz commented Oct 2, 2025

Copy link
Copy Markdown
Member

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 added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Oct 2, 2025

ttw225 commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review—much appreciated!

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

picnixz merged commit f3d7fae into python:main Oct 2, 2025
42 checks passed
github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 2, 2025

Copy link
Copy Markdown

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 Bot commented Oct 2, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 2, 2025

bedevere-app Bot commented Oct 2, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.13 only 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>
ttw225 deleted the doc/improve_enum branch April 6, 2026 06:40
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

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL