<div dir="ltr">> If the shebang line is `#!/usr/bin/env python3` and there is no python3.exe on PATH, that will be an error.<br><div><br></div><div>Anyway, has current policy supports Python 2.7, it would be some kind of policy violation to require python 3 [1],</div><div>so I don't think we should go that way until we explicitly require Python3. Once that milestone is reached,</div><div>let's say in january, 2021, my educated guess is that python3 and python will be equivalent on most systems and we don't need to make a move.</div><div><br></div><div>What about this:</div><div><br></div><div>1. until autumn: do nothing, try to preserve py2 / py3 compat<br></div><div>2. in autumn: prepare a patch that</div><div> 2.1 update doc requirement, and enforces it in cmake</div><div> 2.2 test that change on all buildbots</div><div>3. in winter: (snakes brumate in winter)</div><div> 3.1 merge the above patch</div><div> 3.2 iteratively remove compatibility layer wherever it makes sense, in an iterative, distributed manner</div><div><br></div><div>Concerning 2.2, buildbot being an old python package, it may live on old machine with only python2, there may be some friction. that being said,</div><div>Buildbot no longer supports Python 2.7 on the Buildbot master...<br></div><div><br></div><div>I don't know if 3.2 makes sense, or if we should just keep existing code as is, and just don't care about compatibility for newer code.</div><div>The good thing is that 3.2 can span over multiple people and over time.</div><div><br></div><div><br></div><div><br></div><div>[1] as of 058070893428a480b76a137f647ae6b9c89ac2d4, the only scripts that explicitly require python3 are the following:</div><div>./libclc/generic/lib/gen_convert.py:#!/usr/bin/env python3<br></div><div>./llvm/utils/release/github-upload-release.py:#!/usr/bin/env python3<br>./llvm/utils/add_argument_names.py:#!/usr/bin/env python3<br>./llvm/utils/update_analyze_test_checks.py:#!/usr/bin/env python3<br>./llvm/utils/llvm-compilers-check:#!/usr/bin/python3<br>./llvm/utils/update_test_checks.py:#!/usr/bin/env python3<br>./llvm/utils/update_mca_test_checks.py:#!/usr/bin/env python3<br>./llvm/utils/update_llc_test_checks.py:#!/usr/bin/env python3<br>./llvm/utils/update_mir_test_checks.py:#!/usr/bin/env python3<br>./llvm/utils/lit/install/bin/lit:#!/opt/rh/rh-python36/root/usr/bin/python<br>./llvm/tools/sancov/coverage-report-server.py:#!/usr/bin/env python3<br>./mlir/utils/spirv/gen_spirv_dialect.py:#!/usr/bin/env python3<br>./clang/utils/convert_arm_neon.py:#!/usr/bin/env python3<br>./polly/test/update_check.py:#! /usr/bin/env python3<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 10:26 PM Reid Kleckner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Wed, Jan 29, 2020 at 1:12 PM Tobias Hieta via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020, 21:30 Fangrui Song via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I also recall Reid said `#!/usr/bin/env python` might make Windows<br>
developers happier but I forget the details.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Python on windows has a wrapper that parses this line and selects which python to use bases on that.</div></div></blockquote><div><br></div><div>I believe many developers develop from the "git bash" msys shell. In this context, bash will interpret the shebang line. If the shebang line is `#!/usr/bin/env python3` and there is no python3.exe on PATH, that will be an error.</div><div><br></div><div>For the Linux distros that are removing Python 2, will "python" find Python 3 in the future, or will we have to say "python3" explicitly?</div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>