See past discussion for 0.6 cycle [DISCUSS] Require python3.6 vs python 3.5 compatibility
We kept the python 3.5 compatibility for the 0.6 release. This is an RFC to see what shall we do in the 0.7 release cycle. Given that more time shas past and our techinical goals have also changed, we list the new considerations as follows
3.6 Features that could Benefit the Project
There are two features which would be relevant for us f-string
and type annotation in class objects
. While f-string is more like a sugar that can be replaced in another way. Class object type annotation would be more critical for potential new features we want to develop. In particular, given the first-class python support goal we set, we will likely introduce more python DSLs that involves python AST, parsing. The following snipet gives a possible mock up API that parses a python object definition to define an ADT(which requires 3.6).
@tvm.hybrid.object
class ADTObject:
field_A : int
field_B : float
Availability
- python3.6 was released in Dec 2016(three years ago)
- ubuntu 16.04 still defaults to python 3.5, while ubuntu 18.04 supports 3.6
- There are ppas in 16.04 which could gain 3.6 support
Limited Support for Runtime
We can also separate the concern of supporting advanced compiler features, and support for runtime only features for 3.5.
Note that this could still complicates things for our developers. For example, I could imagine more typed objects when we lift the 3.6 limit, and some of the code could creep in. So one could also argue that we just set a simple cut.
Discussions
Please share your thoughts.