[DISCUSS] Require python3.6 vs python 3.5 compatibility

As per https://github.com/dmlc/tvm/issues/2715 we have already started to require python3.5 in the current TVM stack.

The community also started to want new features in 3.6 namely f-string and better type annotations. We have been so far tried to keep 3.5 compatibility, but sometimes 3.6 features leaks through because the CI env uses 3.6 at the moment. We will be working on adding 3.5 to CI to cover at least parts of the tests if there is a strong case for keeping 3.5 support, but that will indeed mean some additional engineering overhead.

This is an RFC to see how does everyone feel about making 3.6 a hard requirement versus keep 3.5 support for a good period of time. Given that half a year has passed since our last discussion.

Please share your thoughts.

1 Like

In my opinion, I prefer Python 3.5 in this release cycle and could upgrade to 3.6 in next release cycle. As we have agreed, this release cycle we start 3.5. I don’t think it is a good idea changing to another Python 3 version unless there is one important feature we must need 3.6. I think we should supply one section in README.md of Python version requirement.

Minimum python version supported is effectively dictated by the set of platforms we aspire TVM to work on…

For example:

  • Aspiring to support all currently “in support” ubuntu LTS releases anchors us to python3.5 (16.04 LTS is python3.5 and will be in support until April 2024).
  • Aspiring to support only the most recent “in support” ubunto LTS release, gives is considerably more flexibility (18.04LTS is python 3.6.? and I believe will be superceeded April 2020).

This logic can be extended to cover key platforms (suse, fedora / rhel and I expect there is an equivalent logic we can apply to pick up macos?) etc

Taking the approach of defining where TVM should work in this manner provides a well defined criteria for a minimum supported python version but also addresses the same decision for any other pre-requisite library/package…

I think it doesn’t matter that much between python 3.5 and 3.6 for TVM, except for f-string, which is avoidable. I think as long as we explicitly check python version in some init.py, as Bing did before, this is fine