[llvm-dev] [RFC] Python 2 / Python 3 status
Serge Guelton via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 29 02:26:18 PST 2020
Python2 has reached end of support, and many core Python packages are
dropping pthon 2 support.
This is a subject that raises periodically on this mlist, with a rather strong
no in 2018 [-1] and a slow move in 2019 [-2, -3].
Even if Python is not a core build requirement, it's used during some
configurations steps (e.g. in the cmake export_executable_symbols function),
for testing, and it is definitevely part of the user experience - several clang
tools depend on it, as well as many lldb features. So it's not only about utility
Fedora has moved to Python3 , RHEL8 ships Python3 by default  (though
RHEL7 still ships Python2, but it has reached « End of Full Support »).
Latest OSX version also explicitly obsoletes Python2 . Debian always ships
both interpreter - even in stable 
There has been an effort in LLVM/lldb/clang/... to make all Python scripts
portable across Python2 and Python3 version , but if the documentation and
``GettingStarted.rst`` is to be trust, we only require >=2.7. This may be
considered as a maintenance burden, see for instance this discussion . Plus
LLVM doesn't have a strong conservative culture, e.g. wrt CMake requirements.
My personal take on this would be to start moving forward. Still supporting both
version this year, but obsoleting Python 2.7 and requiring, say Python 3.6,
starting January 2021 looks like a good compromise.
More information about the llvm-dev