Skip to content

Docs: Use EnumType instead of EnumMeta in data model example - #163060

Merged
picnixz merged 2 commits into
python:mainfrom
aliysnm:docs-datamodel-enumtype
Dec 3, 2026
Merged

picnixz merged 2 commits into
python:mainfrom
aliysnm:docs-datamodel-enumtype

Conversation

@aliysnm

@aliysnm aliysnm commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

EnumMeta was renamed to EnumType in Python 3.11 (EnumMeta remains as an alias), but the __class_getitem__ example in the data model reference still shows the old name:

>>> type(Menu)
<class 'enum.EnumMeta'>   # documented
<class 'enum.EnumType'>   # actual output on 3.11+

This updates the example output and the comment below it. It's a trivial docs fix, so I believe it can use the skip issue and skip news labels.

I found this by running the >>> examples in literal (::) blocks, which the Sphinx doctest builder doesn't check, against a fresh main build. I used an AI assistant to write that script and to prepare this PR. I re-ran the corrected example (5/5 pass) and built the HTML docs locally.

EnumMeta was renamed to EnumType in Python 3.11 (EnumMeta is kept as an
alias), so type(Menu) now shows <class 'enum.EnumType'>. Update the
__class_getitem__ example output and the accompanying comment.
@python-cla-bot

python-cla-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

📖 2 files modified


Preview · build overview · cpython-previews · built Dec. 3, 2026, 9:53 a.m. UTC

@picnixz
picnixz merged commit 94e7d73 into python:main Dec 3, 2026
45 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

Sorry, @aliysnm and @picnixz, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker 94e7d735f9595bdc3664977221f4f6e372c2b6b8 3.14

@bedevere-app

bedevere-app Bot commented Dec 3, 2026

Copy link
Copy Markdown

GH-163086 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Dec 3, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Dec 3, 2026
@picnixz

picnixz commented Dec 3, 2026

Copy link
Copy Markdown
Member

@aliysnm Can you make the 3.14 backport please? instructions are given above.

picnixz pushed a commit that referenced this pull request Dec 3, 2026
…3060) (#163086)

Use `EnumType` instead of `EnumMeta` in enum's examples (GH-163060)
(cherry picked from commit 94e7d73)

Co-authored-by: Ali <105012194+aliysnm@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Dec 3, 2026

Copy link
Copy Markdown

GH-163093 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 Dec 3, 2026
picnixz pushed a commit that referenced this pull request Dec 3, 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 issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants