Repository navigation
Docs: Use EnumType instead of EnumMeta in data model example - #163060
Merged
Merged
Conversation
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.
|
📖 2 files modified Preview · build overview · cpython-previews · built Dec. 3, 2026, 9:53 a.m. UTC |
aliysnm
force-pushed
the
docs-datamodel-enumtype
branch
from
December 3, 2026 09:50
abfcb89 to
bdbd2de
Compare
picnixz
approved these changes
Dec 3, 2026
|
Sorry, @aliysnm and @picnixz, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-163086 is a backport of this pull request to the 3.15 branch. |
Member
|
@aliysnm Can you make the 3.14 backport please? instructions are given above. |
|
GH-163093 is a backport of this pull request to the 3.14 branch. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EnumMetawas renamed toEnumTypein Python 3.11 (EnumMetaremains 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 issueandskip newslabels.I found this by running the
>>>examples in literal (::) blocks, which the Sphinx doctest builder doesn't check, against a freshmainbuild. 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.