Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum: do not convert private names into members #86683

Closed
ethanfurman opened this issue Nov 30, 2020 · 5 comments
Closed

Enum: do not convert private names into members #86683

ethanfurman opened this issue Nov 30, 2020 · 5 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes type-bug An unexpected behavior, bug, or error

Comments

@ethanfurman
Copy link
Member

BPO 42517
Nosy @warsaw, @ethanfurman, @miss-islington
PRs
  • bpo-42517: [Enum] do not convert private names into members #23722
  • [3.9] bpo-42517: [Enum] do not convert private names into members (GH-23722) #23748
  • [3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 #29113
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ethanfurman'
    closed_at = <Date 2020-12-14.23:58:05.919>
    created_at = <Date 2020-11-30.22:17:33.854>
    labels = ['type-bug', '3.9', '3.10']
    title = 'Enum: do not convert private names into members'
    updated_at = <Date 2021-10-20.23:11:51.215>
    user = 'https://github.com/ethanfurman'

    bugs.python.org fields:

    activity = <Date 2021-10-20.23:11:51.215>
    actor = 'ethan.furman'
    assignee = 'ethan.furman'
    closed = True
    closed_date = <Date 2020-12-14.23:58:05.919>
    closer = 'ethan.furman'
    components = []
    creation = <Date 2020-11-30.22:17:33.854>
    creator = 'ethan.furman'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42517
    keywords = ['patch']
    message_count = 5.0
    messages = ['382200', '382795', '382814', '383024', '404538']
    nosy_count = 4.0
    nosy_names = ['barry', 'eli.bendersky', 'ethan.furman', 'miss-islington']
    pr_nums = ['23722', '23748', '29113']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue42517'
    versions = ['Python 3.9', 'Python 3.10']

    @ethanfurman
    Copy link
    Member Author

    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

    @ethanfurman ethanfurman added the 3.10 only security fixes label Nov 30, 2020
    @ethanfurman ethanfurman self-assigned this Nov 30, 2020
    @ethanfurman ethanfurman added the type-bug An unexpected behavior, bug, or error label Nov 30, 2020
    @ethanfurman
    Copy link
    Member Author

    Make that deprecate in 3.9, work correctly in 3.10.

    @ethanfurman
    Copy link
    Member Author

    New changeset 7cf0aad by Ethan Furman in branch 'master':
    bpo-42517: [Enum] do not convert private names into members (GH-23722)
    7cf0aad

    @ethanfurman
    Copy link
    Member Author

    New changeset aba12b6 by Miss Islington (bot) in branch '3.9':
    [3.9] bpo-42517: [Enum] deprecate private name members (GH-23722) (GH-23748)
    aba12b6

    @ethanfurman ethanfurman added the 3.9 only security fixes label Dec 14, 2020
    @ethanfurman
    Copy link
    Member Author

    New changeset 9733c96 by Ethan Furman in branch '3.9':
    [3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113)
    9733c96

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant