Skip to content

Make 'typing' package Python 2 compatible #160

@vlasovskikh

Description

@vlasovskikh

The current typing module doesn't support Python 2 as well as the third-party backports.typing module. It's a good idea to have the source code of the typing module installed on your system when you type check Python 2 code, e.g. against Python stub files with types. It will simplify things for a static type checker.

I guess we could create a backported version of typing. I mean something similar to 3.5.0b1 with all the recent API changes. The 2/3 single source approach won't work here because the module heavily relies on metaclasses and uses type hints in many places.

I will start working on a backport in a separate branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions