Feature: Support __future__ annotations (PEP 563)
I'm looking at using from __future__ import annotations in a lot of my code to reduce the performance impact of adding typing annotations.
Eventually, I think uplink will need to support postponed evaluation of annotations (PEP 563). That will be necessary because this will be enabled by default in Python 4.0
Uplink currently uses inspect.signature to get the annotations, but that will return all annotations as strings, as if all of them were forward reference strings. According to the PEP, to get the actual annotations, uplink needs to use typing.get_type_hints or eval(). There is also an open python feature request to add type hint evaluation to inspect.signature.
I have not tested how uplink behaves with from __future__ import annotations. I'm just not going to use it for now. But I figured I'd file this here so that we can watch the development of this feature between now and python 4.0 (the release that will enable this new behavior by default).