[cfe-dev] python vs python3 shebang

Haojian Wu via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 22 02:29:57 PDT 2021


Hello folks,

We have a mixture of python(2) vs python3 shebang usage in llvm codebase.

As python2 upstream support has ended, what's the LLVM policy here? Shall
we change the shebang to python3 for all scripts?

- For llvm-developer-only python scripts (e.g.
clang-tidy/add_new_check.py), it is safe to do this change, as LLVM
development <https://llvm.org/docs/GettingStarted.html#software> requires
python >= 3.6
- For python scripts being interacted with people's workflow (e.g.
clang-format-diff.py), it seems unclear to me, changing the shebang would
break people's workflow on python2 machines.

I have some patches (https://reviews.llvm.org/D101038,
https://reviews.llvm.org/D101037). What do people think?


Thanks,
Haojian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210422/9285bef9/attachment.html>


More information about the cfe-dev mailing list