-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Enum works in python 3.10 breaks in 3.11 #104271
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
I have this (simplified) code
I tested this (I developed it) using python 3.10.8.
My friend ran it in 3.11.3 and it breaks like this:
We can work around the problem using a
StrEnumand it's all fine. But I think this is a regression bug. I don't think my code should break like this because the standard library changed.Also, fyi, StrEnum is new in 3.11 so I cannot just adjust my own code (which works well).
Linked PRs