New submission from Serhiy Storchaka: Currently enums are pickled by values. It means that if the value of enum is platform depending, pickling one enum you can unpickle other enum on other platform.
Here is a patch which makes enum pickling by name. It also get rid of not needed __getnewargs__(). See also discussions in issue20534 and on Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/145536. ---------- components: Library (Lib) files: enum_pickle_by_name.patch keywords: patch messages: 211394 nosy: alexandre.vassalotti, barry, eli.bendersky, ethan.furman, larry, pitrou, serhiy.storchaka priority: release blocker severity: normal stage: patch review status: open title: Pickle enums by name type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file34113/enum_pickle_by_name.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20653> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com