-
Notifications
You must be signed in to change notification settings - Fork 176
Pickling enum types with cloudpickle #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a bug because the same code works with |
For this specific case, In general, |
By hook you mean a dedicated |
by hook I mean a special handling in EDIT: better use |
Some updates: A simple example: In [1]: import enum
In [2]: import types
In [3]: type(enum.IntEnum)
Out[3]: enum.EnumMeta
In [4]: Color = types.new_class('Color', bases=(enum.IntEnum,), kwds=None, exec_body=None)
In [5]: type(Color)
Out[5]: enum.EnumMeta
In [6]: Color
Out[6]: <enum 'Color'>
In [7]: issubclass(Color, enum.IntEnum)
Out[7]: True |
@pierreglaser actually I could not make |
Should this be closed now that #246 got merged? |
Indeed. |
Dear all,
cloudpickle currently doesn't support pickling types of type
enum.EnumMeta
. Here is an example to reproduce (on the latest release cloudpickle 0.7):gives the error
Any help with this is appreciated!
-- Philipp.
The text was updated successfully, but these errors were encountered: