classification
Title: Enum: manually call __init_subclass__ after members are added
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ethan.furman Nosy List: ethan.furman
Priority: normal Keywords: patch

Created on 2020-12-04 14:51 by ethan.furman, last changed 2020-12-15 05:07 by ethan.furman. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23714 merged ethan.furman, 2020-12-09 06:37
PR 23772 merged ethan.furman, 2020-12-15 00:13
Messages (3)
msg382489 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-12-04 14:51
__init_subclass__ is being automatically called when the initial Enum is created, but before the members have been added, greatly reducing that method's usefulness.
msg382813 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-12-10 00:41
New changeset 6bd94de168b58ac9358277ed6f200490ab26c174 by Ethan Furman in branch 'master':
bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714)
https://github.com/python/cpython/commit/6bd94de168b58ac9358277ed6f200490ab26c174
msg383030 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-12-15 02:41
New changeset 9d1fff1fcd5332f0ba7f72d0e0f9f66b47ec4e8d by Ethan Furman in branch '3.9':
[3.9] bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714) (GH-23772)
https://github.com/python/cpython/commit/9d1fff1fcd5332f0ba7f72d0e0f9f66b47ec4e8d
History
Date User Action Args
2020-12-15 05:07:19ethan.furmansetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-12-15 02:41:45ethan.furmansetmessages: + msg383030
2020-12-15 00:13:09ethan.furmansetstage: backport needed -> patch review
pull_requests: + pull_request22628
2020-12-10 01:12:42ethan.furmansetstage: patch review -> backport needed
versions: + Python 3.9
2020-12-10 00:41:30ethan.furmansetmessages: + msg382813
2020-12-09 06:37:32ethan.furmansetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request22576
2020-12-04 14:51:03ethan.furmancreate