-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed as not planned
Labels
3.11only security fixesonly security fixespendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard 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
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
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixespendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard 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