Issue 26981: add compatibility shim for enum34 backport (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/71168
classification
Title: | add compatibility shim for enum34 backport | ||
---|---|---|---|
Type: | behavior | Stage: | resolved |
Components: | Versions: | Python 3.6 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | Add AutoNumberedEnum to stdlib View:26988 | |
Assigned To: | ethan.furman | Nosy List: | SilentGhost, barry, eli.bendersky, eric.smith, ethan.furman, python-dev |
Priority: | normal | Keywords: |
Created on 2016-05-08 23:45 by ethan.furman, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (9) | ||
---|---|---|
msg265174 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2016-05-08 23:45 |
_sunder_ methods are reserved for internal Enum use, and if the user tries to use any an exception is raised. Consequently, the enum34 backport uses __order__ instead of _order_ to specify a definition order for its members. I would like to do two things: 1) add _order_ to the stdlib version 2) ensure the actual definition order is the same as what is specified in _order_ | ||
msg265175 - (view) | Author: Eric V. Smith (eric.smith) * ![]() |
Date: 2016-05-09 00:26 |
Doesn't namedtuple use _fields (as opposed to _fields_) for a similar purpose? Would Enum using _order be more consistent with that? | ||
msg265176 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2016-05-09 00:49 |
It would, but that's not what we did. Currently we have _name_ and _value_; the backport uses __order__ because I didn't want the stdlib version having a hairball when someone tried to use a 2.7 Enum in 3.4 and it didn't occur to me at the time to just add and ignore _order_. | ||
msg272072 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2016-08-05 23:24 |
Done in . | ||
msg273191 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2016-08-20 07:19 |
Issue 26988 reverted. Need to add shim here. | ||
msg273214 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2016-08-20 14:19 |
New changeset 10830e1b2966 by Ethan Furman in branch 'default': : add _order_ compatibility shim to enum.Enum https://hg.python.org/cpython/rev/10830e1b2966 | ||
msg273216 - (view) | Author: SilentGhost (SilentGhost) * ![]() |
Date: 2016-08-20 14:31 |
Ethan, in Misc/NEWS it says "compatibility ship" | ||
msg273220 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2016-08-20 15:56 |
New changeset bdfd4c8384de by Ethan Furman in branch 'default': : fix typo https://hg.python.org/cpython/rev/bdfd4c8384de | ||
msg273221 - (view) | Author: Ethan Furman (ethan.furman) * ![]() |
Date: 2016-08-20 15:57 |
Thanks! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:30 | admin | set | github: 71168 |
2016-08-20 15:57:12 | ethan.furman | set | messages: + |
2016-08-20 15:56:58 | python-dev | set | messages: + |
2016-08-20 14:31:49 | SilentGhost | set | nosy: + SilentGhostmessages: + |
2016-08-20 14:21:28 | ethan.furman | set | status: open -> closedresolution: fixedstage: needs patch -> resolved |
2016-08-20 14:19:55 | python-dev | set | nosy: + python-devmessages: + |
2016-08-20 07:19:26 | ethan.furman | set | status: closed -> openresolution: fixed -> (no value)messages: + |
2016-08-05 23:24:36 | ethan.furman | set | status: open -> closedsuperseder: Add AutoNumberedEnum to stdlibresolution: fixedmessages: + |
2016-05-09 00:49:20 | ethan.furman | set | messages: + |
2016-05-09 00:26:38 | eric.smith | set | nosy: + eric.smithmessages: + |
2016-05-08 23:45:21 | ethan.furman | create |