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

Finer-grained exceptions for the ssl module #55392

Closed
pitrou opened this issue Feb 11, 2011 · 5 comments
Closed

Finer-grained exceptions for the ssl module #55392

pitrou opened this issue Feb 11, 2011 · 5 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Feb 11, 2011

BPO 11183
Nosy @pitrou, @giampaolo
Files
  • sslerrors.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 2011-10-27.22:03:53.886>
    created_at = <Date 2011-02-11.10:08:30.273>
    labels = ['type-feature', 'library']
    title = 'Finer-grained exceptions for the ssl module'
    updated_at = <Date 2011-10-27.22:03:53.885>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2011-10-27.22:03:53.885>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-10-27.22:03:53.886>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2011-02-11.10:08:30.273>
    creator = 'pitrou'
    dependencies = []
    files = ['23498']
    hgrepos = []
    issue_num = 11183
    keywords = ['patch']
    message_count = 5.0
    messages = ['128370', '140292', '146196', '146522', '146523']
    nosy_count = 4.0
    nosy_names = ['exarkun', 'pitrou', 'giampaolo.rodola', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue11183'
    versions = ['Python 3.3']

    @pitrou
    Copy link
    Member Author

    pitrou commented Feb 11, 2011

    pyOpenSSL (*) has the good idea of defining exception subclasses for the various OpenSSL error codes (ZeroReturnError, WantReadError, etc.). The ssl module could do the same.

    (*) http://packages.python.org/pyOpenSSL/openssl-ssl.html

    @pitrou pitrou added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Feb 11, 2011
    @pitrou
    Copy link
    Member Author

    pitrou commented Jul 13, 2011

    Note: the ERR_GET_REASON() macro helps get a more precise explanation of an error. We could add a reason attribute to raised exceptions, and also provide a mnemonic-integer mapping.

    @pitrou
    Copy link
    Member Author

    pitrou commented Oct 22, 2011

    Here is a patch. It adds SSLZeroReturnError, SSLWantReadError, SSLWantWriteError, SSLSyscallError and SSLEOFError.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 27, 2011

    New changeset 2c4a9c778bb3 by Antoine Pitrou in branch 'default':
    Issue bpo-11183: Add finer-grained exceptions to the ssl module, so that
    http://hg.python.org/cpython/rev/2c4a9c778bb3

    @pitrou
    Copy link
    Member Author

    pitrou commented Oct 27, 2011

    Committed now.

    @pitrou pitrou closed this as completed Oct 27, 2011
    @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

    1 participant