[New-bugs-announce] [issue20653] Pickle enums by name

Serhiy Storchaka report at bugs.python.org
Mon Feb 17 08:03:56 CET 2014

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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list