Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Bug report
Run the following code:
import enumimport pickleclass PxdEnum(enum.IntFlag): RANK_0 = 11 RANK_1 = 37 RANK_2 = 389print(pickle.loads(pickle.dumps(PxdEnum.RANK_2)))On Python 3.10.10 I getPxdEnum.RANK_2
On Python 3.11.2 I get389 (which is probably also acceptable)
On Python 3.12 (0aaef83351473e8f4eb774f8f999bbe87a4866d7) I get
Traceback (most recent call last): File "<path>/enumpickle.py", line 9, in <module> print(pickle.loads(pickle.dumps(PxdEnum.RANK_2))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^TypeError: unsupported operand type(s) for |: 'PxdEnum' and 'NoneType'Your environment
Tested as described on Python 3.10, 3.11, and 3.12.
Linux