-
Notifications
You must be signed in to change notification settings - Fork 820
Closed
Labels
Description
Environment
Mac OS
$ sw_vers -productVersion
10.14
$ python -V
Python 3.6.3
$ python -c 'import graphene; print(graphene.__version__)'
2.1.3
Reproduce
import graphene
import pickle
class ExampleEnum(graphene.Enum):
CAT = 1
DOG = 2
print(pickle.dumps(ExampleEnum.CAT))
Traceback (most recent call last):
File "/Users/exanpleuser/scratches/scratch.py", line 9, in <module>
print(pickle.dumps(ExampleEnum.CAT))
_pickle.PicklingError: Can't pickle <enum 'EnumMeta'>: attribute lookup ExampleEnum on graphene.types.enum failed
Expected
Pickle can perform dumps
and loads
on graphene.Enum
objects
DrPyser and senseysensor