<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Personally, every machine I work with only has Python 2.7.</div><div class=""><br class=""></div>Justin is correct that there is a non-trivial amount of effort to convert the bots. <div class=""><br class=""></div><div class="">Python 3 is wonderful. But, a Python 3 dependency seems like one burden that could be avoided. We have already made that trade-off in the past, for example by only using standard python packages, so there is less/nothing to pip install when getting started. Dependencies likes host compiler and cmake totally make sense given they are central to how LLVM is made. I don’t think the same for the python code.</div><div class=""><br class=""></div><div class="">I’m in favor of 2/3 compatibility until the death clock ends.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 30, 2018, at 4:48 AM, 陳韋任 via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Does Python 3 have feature we want to use in LLVM codebase, and no workaround there? If so, please give some examples. I think that makes the discussion more concrete.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2018-01-30 4:46 GMT+08:00 Fāng-ruì Sòng via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi LLVM-Devs,<br class="">
<br class="">
I noticed that many Python scripts under utils/ have a shebang of<br class="">
`#!/usr/bin/python` (which is a symlink to python2.7 on many platforms) and some of them use Python 2 syntax that is not compatible with Python 3 (e.g. print statements; str/bytes)<br class="">
<br class="">
I created a revision to migrate utils/update_{llc_,}_test_chec<wbr class="">ks.py from Python 2 to Python 3 <a href="https://reviews.llvm.org/D42450" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D4245<wbr class="">0</a> , the arguments against making it Python 3 is:<br class="">
<br class="">
* There are many Mac OS X users and Mac OS X 10.8 comes with Python 2.7 pre-installed [0] but not Python 3.<br class="">
* Forcing scripts to use Python 3 (by doing so we can avoid some compatibility trouble) may not be a good idea.<br class="">
<br class="">
Python 2.7 was published in 2010 and planned as the last of the 2.x releases. It will not be maintained past 2020 and there is also a retirement page <a href="https://pythonclock.org/" rel="noreferrer" target="_blank" class="">https://pythonclock.org/</a> .<br class="">
<br class="">
The second argument would not need to be addressed if the first one did not lay too much burden on developers. After all, we have to install `cmake, ninja/GNU Make / libedit(for lldb)` to build LLVM. These packages are not installed by default on many platforms.<br class="">
<br class="">
Thoughts on deprecating Python 2 for utils/ scripts (different from libclang or lldb scripts) which are not user-facing?<br class="">
<br class="">
[0]: <a href="https://docs.python.org/3/using/mac.html#getting-and-installing-macpython" rel="noreferrer" target="_blank" class="">https://docs.python.org/3/usin<wbr class="">g/mac.html#getting-and-install<wbr class="">ing-macpython</a><br class="">
<br class="">
<br class="">
Thanks,<br class="">
Fangrui<br class="">
______________________________<wbr class="">_________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-dev</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">Wei-Ren Chen (陳韋任)<br class="">Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank" class="">https://people.cs.nctu.edu.tw/~chenwj</a></div></div></div>
</div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>