This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Enum: do not convert private names into members
Type: behavior Stage: resolved
Components: Versions: Python 3.10, Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ethan.furman Nosy List: barry, eli.bendersky, ethan.furman, miss-islington
Priority: normal Keywords: patch

Created on 2020-11-30 22:17 by ethan.furman, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23722 merged ethan.furman, 2020-12-09 17:04
PR 23748 merged miss-islington, 2020-12-13 00:46
PR 29113 merged ethan.furman, 2021-10-20 20:25
Messages (5)
msg382200 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-11-30 22:17
Currently, private names such as '__location' will get both name mangled and converted into an attribute, while `__location_` will get mangled, but not converted as the final name is sundered (e.g. `_MyEnum__location_`).

Just in case anyone is actually using private name Enum members we'll deprecate in 3.10, and in 3.11 private names will:

- not be converted
- not raise sunder errors
msg382795 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-12-09 16:42
Make that deprecate in 3.9, work correctly in 3.10.
msg382814 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-12-10 01:12
New changeset 7cf0aad96d1d20f07d7f0e374885f327c2d5ff27 by Ethan Furman in branch 'master':
bpo-42517: [Enum] do not convert private names into members (GH-23722)
msg383024 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2020-12-14 23:57
New changeset aba12b67c18b17bb727a0d50dd0653e38cb64dc8 by Miss Islington (bot) in branch '3.9':
[3.9] bpo-42517: [Enum] deprecate private name members (GH-23722) (GH-23748)
msg404538 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2021-10-20 23:11
New changeset 9733c9651afad84ab2f010e9e68b7c03976ea9f3 by Ethan Furman in branch '3.9':
[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113)
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86683
2021-10-20 23:11:51ethan.furmansetmessages: + msg404538
2021-10-20 20:25:07ethan.furmansetpull_requests: + pull_request27380
2020-12-14 23:58:05ethan.furmansetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.9
2020-12-14 23:57:11ethan.furmansetmessages: + msg383024
2020-12-13 00:46:33miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request22606
2020-12-10 01:12:38ethan.furmansetmessages: + msg382814
2020-12-09 17:04:42ethan.furmansetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request22583
2020-12-09 16:42:51ethan.furmansetmessages: + msg382795
2020-11-30 22:17:33ethan.furmancreate