patrick-kidger / torchtyping

Type annotations and dynamic checking for a tensor's shape, dtype, names, etc.
Apache License 2.0
1.41k stars 34 forks source link

Is it possible to support python3.7 #7

Closed Stonesjtu closed 3 years ago

AdilZouitine commented 3 years ago

As it stands I don't think this is possible because the code is based on typing.Annotated which appears in python 3.9.

patrick-kidger commented 3 years ago

So I actually think this might be possible using typing_extensions.Annotated instead. I've not tried it though, or checked if anything else goes wrong. Happy to accept a PR on this. (I might get round to it myself eventually, but as a Python 3.9 user it's not a priority for me.)

AdilZouitine commented 3 years ago

It seem a good idea with this fix the minimum version will be python 3.5 or 3.6, this will allow a larger part of the community to be able to use this library. I have some free time next week, if no one takes this PR I can take it.

patrick-kidger commented 3 years ago

Sounds good, thanks. I don't think there's much worry about going below Python 3.7 though, as:

AdilZouitine commented 3 years ago

Got it !

patrick-kidger commented 3 years ago

Closed by #11.