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

Make ssl.PROTOCOL_* an enum #65267

Closed
pitrou opened this issue Mar 25, 2014 · 10 comments
Closed

Make ssl.PROTOCOL_* an enum #65267

pitrou opened this issue Mar 25, 2014 · 10 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Mar 25, 2014

BPO 21068
Nosy @pitrou, @giampaolo, @tiran, @ethanfurman, @dstufft
Files
  • sslproto_enum.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 = None
    closed_at = <Date 2014-04-18.18:39:14.560>
    created_at = <Date 2014-03-25.23:13:47.137>
    labels = ['type-feature', 'library']
    title = 'Make ssl.PROTOCOL_* an enum'
    updated_at = <Date 2014-04-18.18:39:14.559>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2014-04-18.18:39:14.559>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-04-18.18:39:14.560>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2014-03-25.23:13:47.137>
    creator = 'pitrou'
    dependencies = []
    files = ['34621']
    hgrepos = []
    issue_num = 21068
    keywords = ['patch']
    message_count = 10.0
    messages = ['214865', '214868', '214869', '214870', '214872', '215071', '216517', '216540', '216790', '216791']
    nosy_count = 7.0
    nosy_names = ['janssen', 'pitrou', 'giampaolo.rodola', 'christian.heimes', 'ethan.furman', 'python-dev', 'dstufft']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21068'
    versions = ['Python 3.5']

    @pitrou
    Copy link
    Member Author

    pitrou commented Mar 25, 2014

    Small patch to make PROTOCOL_SSLv23 and friends enum members. Not sure this is useful.

    @pitrou pitrou added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Mar 25, 2014
    @dstufft
    Copy link
    Member

    dstufft commented Mar 25, 2014

    I don't really feel real strongly one way or another about this patch fwiw. Not sure it makes anything easier but I don't think it makes anything harder either.

    @pitrou
    Copy link
    Member Author

    pitrou commented Mar 25, 2014

    It may be useful in relation with bpo-20421, since we could then return one of the enum values (not PROTOCOL_SSLv23, of course).

    @dstufft
    Copy link
    Member

    dstufft commented Mar 25, 2014

    Ah, sure it'd probably be useful in that context.

    @giampaolo
    Copy link
    Contributor

    I like this. Possibly it should be done for all ssl APIs returning a constant. Are there others?

    @pitrou
    Copy link
    Member Author

    pitrou commented Mar 28, 2014

    Possibly it should be done for all ssl APIs returning a constant. Are there others?

    There's SSLContext.verify_mode, but it simply mirrors the configuration chosen by the user.

    @pitrou
    Copy link
    Member Author

    pitrou commented Apr 16, 2014

    Anyone else has an opinion on this?

    @ethanfurman
    Copy link
    Member

    Looks good to me.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 18, 2014

    New changeset f776771ab0ee by Antoine Pitrou in branch 'default':
    Issue bpo-21068: The ssl.PROTOCOL* constants are now enum members.
    http://hg.python.org/cpython/rev/f776771ab0ee

    @pitrou
    Copy link
    Member Author

    pitrou commented Apr 18, 2014

    Ok, since this is a low-risk change I've made it anyway.

    @pitrou pitrou closed this as completed Apr 18, 2014
    @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
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants