Question
How should Astropy implement typing?
What is the timeline?
What Infrastructure needs to be built to enable this? e.g. mypy checker in test suite or submissions to python's type-shed.
OLD Description
See #10662
The python typing library is under active development and new and useful features are not available for py3.6-3.8. The typing_extensions library is now the official backport for all these types and is even developed within the main body of python (though offered as a separate install) — see https://github.com/python/typing/tree/master/typing_extensions.
As astropy moves to add static typing, the extended types options, in addition to the guaranteed stability and long-term support, would make this a useful and safe dependency.
I'm making this an issue, not PR, because I know how contentious adding new dependencies can be.
Edit: this would probably not be a permanent additional dependency since the features in typing_extension all become core python. When new features stop being added regularly and our python minveraion catches up, this can be dropped.
Edit: Now suggesting as an OPTIONAL dependency
Question
How should Astropy implement
typing?What is the timeline?
What Infrastructure needs to be built to enable this? e.g. mypy checker in test suite or submissions to python's type-shed.
OLD Description
See #10662
The python
typinglibrary is under active development and new and useful features are not available for py3.6-3.8. Thetyping_extensionslibrary is now the official backport for all these types and is even developed within the main body of python (though offered as a separate install) — see https://github.com/python/typing/tree/master/typing_extensions.As astropy moves to add static typing, the extended types options, in addition to the guaranteed stability and long-term support, would make this a useful and safe dependency.
I'm making this an issue, not PR, because I know how contentious adding new dependencies can be.
Edit: this would probably not be a permanent additional dependency since the features in
typing_extensionall become core python. When new features stop being added regularly and our python minveraion catches up, this can be dropped.Edit: Now suggesting as an OPTIONAL dependency