Skip to content

ssl.Purpose.CLIENT_AUTH is incompatible with ssl.Purpose #2770

Closed

Description

@GoldsteinE

I'm using Python 3.7.2 on Linux x64, mypy 0.660. This code doesn't pass mypy check:

import ssl

def t(x: ssl.Purpose):
    pass

t(ssl.Purpose.CLIENT_AUTH)

CLIENT_AUTH should be compatible with ssl.Purpose:

>>> import ssl
>>> isinstance(ssl.Purpose.CLIENT_AUTH, ssl.Purpose)
True

Activity

  1. added
    stubs: false positive
    on Jan 30, 2019
  2. srittau commented on Jan 30, 2019

    @srittau
    Collaborator

    In newer Python versions (at least since Python 3.5), ssl.Purpose is an enum. Currently in typeshed it is defined as a simple class for all Python versions. Patches welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: false positive

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions