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

Experiment with PEP-484 type hints #101

thibaudcolas opened this issue Sep 4, 2018 · 1 comment

Experiment with PEP-484 type hints #101

thibaudcolas opened this issue Sep 4, 2018 · 1 comment


Copy link

@thibaudcolas thibaudcolas commented Sep 4, 2018

Since Pyre got released, I've been thinking the exporter would be a good project to have type annotations in, either with Pyre or Mypy.

Corresponding PEPs:

Also worth checking out:

As far as I understand, in order to release anything useful, PEP-3107 is the bare minimum, and PEP-484 is a good baseline, so Python 3.5+ only. This means this package would need to drop support for Python 2.7 and 3.4. Wagtail, the main project relying on this package, has already dropped Python 2.7 compatibility, and the last version of Django to support Python 3.4 was v2.0 (

Edit: ^ I might be wrong, since the annotation syntax is supported starting with Python 3 the package should work in versions below 3.5. But type checking will only be doable starting in v3.5+?

This means that starting when Wagtail makes a new release without Django 2.0 support (or without Python 3.4 support, if that comes first), it will be possible to release the exporter with type annotations included (some time in 2019, see

If anyone wants to experiment with this in the meantime, I would be interested to see what bugs this would surface. In my opinion the first step would be to use I think there is a similar project from Google that does annotations based on instrumentation of running code.

@thibaudcolas thibaudcolas added this to the Nice to have milestone Sep 4, 2018
@thibaudcolas thibaudcolas changed the title Experiment with PEP type hints Experiment with PEP-484 type hints Sep 4, 2018

This comment has been minimized.

Copy link
Collaborator Author

@thibaudcolas thibaudcolas commented Dec 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.