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 'typing' package Python 2 compatible #160

Closed
vlasovskikh opened this issue Oct 15, 2015 · 1 comment
Closed

Make 'typing' package Python 2 compatible #160

vlasovskikh opened this issue Oct 15, 2015 · 1 comment

Comments

@vlasovskikh
Copy link
Member

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.

@vlasovskikh vlasovskikh self-assigned this Oct 15, 2015
@JukkaL
Copy link
Contributor

JukkaL commented Oct 16, 2015

Mypy has a somewhat functional Python 2 port of typing as well (https://github.com/JukkaL/mypy/blob/master/lib-typing/2.7/typing.py), though others could be more feature-complete (haven't checked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants