Closed as not planned
Description
Bug report
Follow up to #105332
Following the changes to fix that issue enum.IntFlag
appears to pickle correctly on the latest Python 3.12 commit (dd36656ada05731c069ecd5b1878380294fb1f3e) but fail on Python 3.11.4 (where on 3.11.2 it worked)
Code to reproduce
import enum
import pickle
class PxdEnum(enum.IntFlag):
RANK_0 = 11
RANK_1 = 37
RANK_2 = 389
pickled = pickle.dumps(PxdEnum.RANK_2)
print(pickle.loads(pickled))
error output:
Traceback (most recent call last):
File "<path>/enumtest.py", line 11, in <module>
print(pickle.loads(pickled))
^^^^^^^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for |: 'PxdEnum' and 'NoneType'
Your environment
64 bit Linux, Python 3.11.4