Ethan Furman added the comment:
Thanks, Larry. I'll have one more patch which will be much better comments in
the code, and a small doc enhancement. When it's ready should I reopen this
issue or create a new one?
--
___
Python tracker
Larry Hastings added the comment:
This issue is okay, but it helps my workflow if you'd create a new 3.4
cherry-pick revision for me when it's ready.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
Ethan Furman added the comment:
Discussion started on PyDev.
While working on that I realized/remembered that the main reason to get this in
now is that without it a user *cannot* change how pickling works -- (s)he can
write the methods, but they will be ignored.
--
Larry Hastings added the comment:
Okay, I'm accepting this. I really just wanted to get more eyes on it, and I'm
happy to see that python-dev was pretty unanimous.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
Changes by Larry Hastings la...@hastings.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
___
Eli Bendersky added the comment:
I left some comments in #20653
As for cherry-picking this into 3.4, I'm not sure. Ethan - what is the worst
scenario this patch enables to overcome? Someone getting locked in to by-value
pickling with certain enums in 3.4?
--
Ethan Furman added the comment:
When I implemented pickle support I did not have a complete understanding of
the pickle protocols nor how to best use them. As a result, I picked
__getnewargs__ and only supported protocols 2 and 3 (4 didn't exist yet).
Serhiy came along and explained a bunch
Changes by Ethan Furman et...@stoneleaf.us:
--
Removed message: http://bugs.python.org/msg211739
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
___
Ethan Furman added the comment:
When I implemented pickle support I did not have a complete understanding of
the pickle protocols nor how to best use them. As a result, I picked
__getnewargs__ and only supported protocols 2 and 3 (4 didn't exist yet).
Serhiy came along and explained a bunch
Ethan Furman added the comment:
Larry,
If I make changes to the patch, should I reverse the original and then commit
one new one so you only have one to merge in, or do you mind having two to do?
--
___
Python tracker rep...@bugs.python.org
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
Ethan Furman added the comment:
Can we do that? If a doc change can make it so we're not locked in to
supporting __getnewargs__ I could live with that.
Although, to be honest, I'd rather get the change in *and* have a doc warning
that pickling specifics are subject to change in 3.5. Really,
Larry Hastings added the comment:
If you've committed something already, and want to change it, then please
request both revisions be cherry-picked.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
Larry Hastings added the comment:
We still have a couple of weeks left. Ethan, can you start a discussion in
python-dev about cherry-picking this for 3.4?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
Serhiy Storchaka added the comment:
Besides insignificant style nitpick (if classdict.get('__reduce_ex__') is
None can be written as if '__reduce_ex__' not in classdict) the patch LGTM
at first glance. I'm not very familiar with Enum's complicated machinery and
don't sure that no bugs left
New submission from Ethan Furman:
587fd4b91120: Better pickle support for Enum subclasses.
--
assignee: larry
messages: 211552
nosy: ethan.furman, larry
priority: release blocker
severity: normal
stage: commit review
status: open
title: 3.4 cherry-pick: 587fd4b91120 improve Enum
Larry Hastings added the comment:
I'd like a second opinion about this before it goes in, just due to the size of
the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20679
___
17 matches
Mail list logo