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

socket: finish constant to Enum/Flag conversion #72270

Open
ethanfurman opened this issue Sep 11, 2016 · 8 comments
Open

socket: finish constant to Enum/Flag conversion #72270

ethanfurman opened this issue Sep 11, 2016 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@ethanfurman
Copy link
Member

BPO 28083
Nosy @tiran, @ned-deily, @ethanfurman, @serhiy-storchaka
Files
  • issue-socket.stoneleaf.01.patch
  • 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 = None
    created_at = <Date 2016-09-11.20:34:18.544>
    labels = ['type-feature']
    title = 'socket: finish constant to Enum/Flag conversion'
    updated_at = <Date 2016-09-12.03:08:43.398>
    user = 'https://github.com/ethanfurman'

    bugs.python.org fields:

    activity = <Date 2016-09-12.03:08:43.398>
    actor = 'ethan.furman'
    assignee = 'ethan.furman'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2016-09-11.20:34:18.544>
    creator = 'ethan.furman'
    dependencies = []
    files = ['44567']
    hgrepos = []
    issue_num = 28083
    keywords = ['patch']
    message_count = 8.0
    messages = ['275851', '275852', '275854', '275867', '275868', '275870', '275902', '275931']
    nosy_count = 5.0
    nosy_names = ['christian.heimes', 'ned.deily', 'ethan.furman', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'commit review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28083'
    versions = ['Python 3.6']

    @ethanfurman
    Copy link
    Member Author

    Split from bpo-23591.

    Add IntFlag constants for consistency with IntEnum constants.

    @ethanfurman ethanfurman added the type-feature A feature request or enhancement label Sep 11, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 11, 2016

    New changeset 4a027e55dae3 by Ethan Furman in branch 'default':
    bpo-28083: add IntFlag constants
    https://hg.python.org/cpython/rev/4a027e55dae3

    @tiran
    Copy link
    Member

    tiran commented Sep 11, 2016

    socketmodule.c has more namespaces. Are you planning to wrap them, too?

    NETLINK_
    BTPROTO_
    SOL_
    HCI_
    PF_
    PACKET_
    TIPC_
    SCM_
    ALG_ ()
    CAN_ (
    )
    RDS_ (*)
    IPPROTO_
    IP_
    IPV6_
    TCP_
    EAI_
    SHUT_
    RCVALL_

    (*) constant namespace has sub-namespaces, e,g ALG_SET_ and ALG_OP_

    @ethanfurman
    Copy link
    Member Author

    I don't have enough socket experience to know which constants should go into what groups and what those groups should be called. So far my involvement has been to switch other's patches to use Enum._convert instead of "globals().update(Enum.__members__)". (This last patch was from Serhiy.)

    I am not opposed, though. ;)

    If Larry is okay with adding those during beta 1 I can work on it, but there's no way I could get it done before tomorrow.

    @ethanfurman
    Copy link
    Member Author

    Still need to update docs.

    @tiran
    Copy link
    Member

    tiran commented Sep 11, 2016

    You have to as Ned, not Larry. :)

    @ned-deily
    Copy link
    Member

    One could argue that it is a bug that the other constants are missing. Ethan, if you can work with Christian to get them in by b2, that would be acceptable.

    @ethanfurman
    Copy link
    Member Author

    Thanks, Ned!

    @ethanfurman ethanfurman self-assigned this Sep 12, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @iritkatriel iritkatriel added the stdlib Python modules in the Lib dir label Nov 26, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    4 participants