Bug report
The str() method on Python 3.11.0b4 is outputting the raw integer value not the class name and label that older Python versions do.
importenumclassMyEnum(enum.IntEnum):
TEST=1assertstr(MyEnum.TEST) =="MyEnum.TEST", f"Actual '{MyEnum.TEST}'"On Python 3.10 (and older Python 3 versions) this assertion is true. On python 3.11.0b4 the str value is just 1.
The repr() is the same as on older versions, just seems like str() is affected.
Your environment
- CPython versions tested on: 3.11.0b4
- Operating system and architecture: Linux (should be N/A though)
Bug report
The
str()method on Python 3.11.0b4 is outputting the raw integer value not the class name and label that older Python versions do.On Python 3.10 (and older Python 3 versions) this assertion is true. On python 3.11.0b4 the str value is just
1.The
repr()is the same as on older versions, just seems likestr()is affected.Your environment