We don't use Python 2 anymore, so let us do the recommended fix instead of using the workaround made for Python 2.
Details
- Reviewers
ldionne • Quuxplusone arichardson - Group Reviewers
Restricted Project - Commits
- rGf46f93b47863: [libc++][NFC] Resolve Python 2 FIXME
Diff Detail
Event Timeline
Thanks for this cleanup! Since we just branched LLVM 13 this looks a good time to do this.
I like to see it pass all builds before approving and I really would like @ldionne's approval as well.
Current revision LGTM. I was less thrilled about the proposed diff in libcxx/utils/libcxx/util.py... but it seems to be gone from this latest revision?
libcxx/utils/libcxx/util.py | ||
---|---|---|
218 | This code can be simplified with python 3: In our CHERI fork I changed this to use the timeout= parameter in https://github.com/CTSRD-CHERI/llvm-project/commit/824490b545707689e47cb6fc3a94633468c003a4. I was going to clean-up and upstream that once python3 is required but never got around to it. However, I think we can avoid all of this complexity with Popen+communicate now that we require python 3.6: subprocess.run(command, cwd=cwd, input=input, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) should be sufficient I believe? |
This LGTM with or without the suggested improvements. Ideally we'd make the suggested improvements, but I'll take this patch as-is right now as an improvement over the status quo even without @arichardson's comments.
I did not intend to add a blocking review. I agree this is an improvement, was just suggesting further simplifications
libcxx/CMakeLists.txt | ||
---|---|---|
47 | Does this message provide anything useful from just adding REQUIRED argument to the find_package(Python3 COMPONENTS Interpreter) right above? | |
libcxx/utils/ci/runtimes/CMakeLists.txt | ||
6 | Does this message provide anything useful from just adding REQUIRED argument to the find_package(Python3 COMPONENTS Interpreter) right above? |
libcxx/CMakeLists.txt | ||
---|---|---|
47 | @gAlfonso-bit can you address this comment. so I can commit this patch on your behalf. |
libcxx/CMakeLists.txt | ||
---|---|---|
47 | I mean, it tells the user Python 3 will be required. I admit it's a little quick and dirty but this will be expanded upon in future patches. |
libcxx/CMakeLists.txt | ||
---|---|---|
47 | I don't think it adds additional value over the error that would be provided by find_package at CMake configure time, but I won't block your review on it - just food for thought. |
Does this message provide anything useful from just adding REQUIRED argument to the find_package(Python3 COMPONENTS Interpreter) right above?