[RFC] Python3 Timeline
See original GitHub issueWe plan to do some improvements to the IR in this release cycle, and one such question that comes up is the dependency on python version. Up until now, TVM has always been compatible to both python2 and python3. However, there are language features in python3 that we like, in particular:
- Type annotations like
def myfunc(x:int) -> int
introduced python3.5 - Class type annotations that decorate fields are introduced python3.6
Introducing these type annotations to the code will make the program cleaner, but that also means the code will not be python2 compatible. If we introduce class type annotation, we can only use python3.6. One of the major benefits is that adopting type annotation allows the introduction of typed DSLs
Some of the options are:
- Keep support python2
- For a new set of features, require python3.5+
- Enforce python3.6
For background, currently, ubuntu support(14.04 python3.4, 16.04 python3.5, 18.04 python3.6). Most packages plan to stop supporting python2 on 2019
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (14 by maintainers)
Top GitHub Comments
+1 for python3.6
In terms of package support, the ones TVM requires (numpy and decorator) already support 3.7. Even pypy nightly has 3.6 support!
also f-strings are pretty okay 😃
+1 For a new set of features, require python3.5+. Enforce python3.6 is too aggressive. Many Linux distro are Python 3.5.