Skip to content

gh-136672: Docs: Move parts of Enum HOWTO to API Docs#139176

Merged
ethanfurman merged 5 commits intopython:mainfrom
RafaelWO:change/enum-docs-howto-to-api
Feb 13, 2026
Merged

gh-136672: Docs: Move parts of Enum HOWTO to API Docs#139176
ethanfurman merged 5 commits intopython:mainfrom
RafaelWO:change/enum-docs-howto-to-api

Conversation

@RafaelWO
Copy link
Contributor

@RafaelWO RafaelWO commented Sep 20, 2025

This PR adds the changes discussed in #136791 that were missed before merging (see this comment) to the Enum documentation. That is, removing the duplicated sections __dunder__and _sunder_ names from the Enum HOWTO to the API documentation.

Additionally, the "Finer Points" heading on the Enum HOWTO page is moved one level out:

before after
grafik grafik

Finally, version indicators mentioned in the __dunder__ and _sunder_ sections are added to the corresponding Enum member in the API docs. Also, a note for the Enum member _generate_next_value_ is moved from the _sunder_ section to the API section..


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

RafaelWO and others added 3 commits September 14, 2025 16:58
To avoid duplicate content in the Enum HOWTO and
API documentation which is not automatically synced,
the section about supported __dunder__ and _sunder
names is moved from HOWTO to API docs.

See also python#136791
Before this change, the section "Finer Points" was a subsection of
"When to use __new__() vs. __init__()" which does not make much sense.

This change moves "Finer Points" one level out making it a top level
section. All its subsections are moved as well.
The Enum members listed in the sections of `__dunder__` and `_sunder_`
did not have version indicators in the API docs.
This changes adds the version indicators mentioned in the  `__dunder__`
and `_sunder_` section to the corresponding Enum member.
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 20, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Sep 20, 2025
@RafaelWO RafaelWO changed the title Change/enum docs howto to api gh-136672: Docs: Move parts of Enum HOWTO to API Docs Sep 20, 2025
This changes moves a note for the Enum member `_generate_next_value_`
from the `_sunder_` section to the API section.
The intention is to let `_sunder_` section list all members
but have the details in the API section.
@RafaelWO RafaelWO force-pushed the change/enum-docs-howto-to-api branch from fc092d3 to ff84f94 Compare September 20, 2025 08:45
@AA-Turner AA-Turner added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Sep 21, 2025
@RafaelWO
Copy link
Contributor Author

RafaelWO commented Jan 7, 2026

@ethanfurman any chance you have time for a review? thanks! 🙂

@RafaelWO
Copy link
Contributor Author

@ethanfurman thanks for approving! Is there anything missing for it to be merged?

@ethanfurman ethanfurman merged commit 629a363 into python:main Feb 13, 2026
32 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Feb 13, 2026
@miss-islington-app
Copy link

Thanks @RafaelWO for the PR, and @ethanfurman 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 Feb 13, 2026
…-139176)

To avoid duplicate content in the Enum HOWTO and
API documentation which is not automatically synced,
the section about supported __dunder__ and _sunder
names is moved from HOWTO to API docs.

See also python#136791
(cherry picked from commit 629a363ddd2889f023d5925506e61f5b6647accd)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 13, 2026
…-139176)

To avoid duplicate content in the Enum HOWTO and
API documentation which is not automatically synced,
the section about supported __dunder__ and _sunder
names is moved from HOWTO to API docs.

See also python#136791
(cherry picked from commit 629a363)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 13, 2026

GH-144802 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 Feb 13, 2026
@bedevere-app
Copy link

bedevere-app bot commented Feb 13, 2026

GH-144803 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 Feb 13, 2026
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.

3 participants