[issue20679] 3.4 cherry-pick: 587fd4b91120 improve Enum subclass behavior

Eli Bendersky report at bugs.python.org
Fri Feb 21 06:14:20 CET 2014


Eli Bendersky added the comment:

The discussion in #20653 is ongoing but I have to say I don't feel confident about this issue at all.

If anything, I'd prefer to explicitly mark "advanced pickling support" for enums as provisional in 3.4 - this is a simple documentation fix Larry should have no qualms accepting into the RC. We can say that unless folks do funky things, pickling enums should work. But as for support for defining all kinds of strange custom pickling behaviors, this is not supported at this point.

I think we all need some time to think about the interaction of enums with pickling and properly document all the scenarios we want, and - more importantly - don't want to support.

Enum internals are too complex. Interaction with pickles is even trickier. We don't have to make these decisions in a rush right now.

In short, I'm -1 on cherry picking, with +1 on putting provisional disclaimers in strategic places within the enum doc to save us from backwards compatibility worries in this domain for the upcoming cycle.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20679>
_______________________________________


More information about the Python-bugs-list mailing list