This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients alexandre.vassalotti, barry, eli.bendersky, ethan.furman, pitrou, python-dev, serhiy.storchaka
Date 2014-02-08.13:08:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Serhiy commented:
> Actually they don't pickle due to wrong __module__. After adding
>    NEI.__module__ = NamedInt.__module__ = __name__
> PicklingError no longer raised for enum class.

If you were to look at the `_make_class_unpicklable` function you would see it works by setting __module__ to <unknown>.  So, in fact, it does not pickle precisely because it has the wrong module, and your change undoes what Enum was tryng to do: if an instance cannot be pickled, don't let the class be pickled either.
Date User Action Args
2014-02-08 13:08:43ethan.furmansetrecipients: + ethan.furman, barry, pitrou, alexandre.vassalotti, eli.bendersky, python-dev, serhiy.storchaka
2014-02-08 13:08:43ethan.furmansetmessageid: <>
2014-02-08 13:08:43ethan.furmanlinkissue20534 messages
2014-02-08 13:08:43ethan.furmancreate