Skip to content

[RFC] Python3 Timeline #1602

@tqchen

Description

@tqchen

We 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions