From 88cbac0495b45e7ecfeba4fbab0c20d5e12807e6 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 19 Mar 2026 19:16:08 +0000 Subject: [PATCH] [libc++] Unify python shebangs (#187258) As per PEP-0394[1], there is no real concensus over what binary names Python has, specifically 'python' could be Python 3, Python 2, or not exist. However, everyone has a python3 interpreter and the scripts are all written for Python 3. Unify the shebangs so that the ~50% of shebangs that use python now use python3. [1] https://peps.python.org/pep-0394/ --- libcxx/test/libcxx-03/transitive_includes/to_csv.py | 2 +- libcxx/test/libcxx/transitive_includes/to_csv.py | 2 +- libcxx/utils/ci/lnt/commit-watch | 2 +- libcxx/utils/ci/lnt/run-benchmarks | 2 +- libcxx/utils/generate_abi_list.py | 2 +- libcxx/utils/generate_escaped_output_table.py | 2 +- libcxx/utils/generate_extended_grapheme_cluster_table.py | 2 +- libcxx/utils/generate_extended_grapheme_cluster_test.py | 2 +- libcxx/utils/generate_feature_test_macro_components.py | 2 +- libcxx/utils/generate_indic_conjunct_break_table.py | 2 +- libcxx/utils/generate_iwyu_mapping.py | 2 +- libcxx/utils/generate_width_estimation_table.py | 2 +- libcxx/utils/run.py | 2 +- libcxx/utils/ssh.py | 2 +- libcxx/utils/sym_diff.py | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libcxx/test/libcxx-03/transitive_includes/to_csv.py b/libcxx/test/libcxx-03/transitive_includes/to_csv.py index 3035ff6cfe5c..b98bb5aa699d 100755 --- a/libcxx/test/libcxx-03/transitive_includes/to_csv.py +++ b/libcxx/test/libcxx-03/transitive_includes/to_csv.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/test/libcxx/transitive_includes/to_csv.py b/libcxx/test/libcxx/transitive_includes/to_csv.py index 3035ff6cfe5c..b98bb5aa699d 100755 --- a/libcxx/test/libcxx/transitive_includes/to_csv.py +++ b/libcxx/test/libcxx/transitive_includes/to_csv.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/ci/lnt/commit-watch b/libcxx/utils/ci/lnt/commit-watch index 19aa76cb191f..6aec4712d403 100755 --- a/libcxx/utils/ci/lnt/commit-watch +++ b/libcxx/utils/ci/lnt/commit-watch @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/ci/lnt/run-benchmarks b/libcxx/utils/ci/lnt/run-benchmarks index 256871b6a857..bd6896fe30cb 100755 --- a/libcxx/utils/ci/lnt/run-benchmarks +++ b/libcxx/utils/ci/lnt/run-benchmarks @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_abi_list.py b/libcxx/utils/generate_abi_list.py index 94e49dca60af..5e99b14bec72 100755 --- a/libcxx/utils/generate_abi_list.py +++ b/libcxx/utils/generate_abi_list.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_escaped_output_table.py b/libcxx/utils/generate_escaped_output_table.py index 59dd707ae612..6be7d128ed5f 100755 --- a/libcxx/utils/generate_escaped_output_table.py +++ b/libcxx/utils/generate_escaped_output_table.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_extended_grapheme_cluster_table.py b/libcxx/utils/generate_extended_grapheme_cluster_table.py index c64a5a00c4c1..83b86fa9c130 100755 --- a/libcxx/utils/generate_extended_grapheme_cluster_table.py +++ b/libcxx/utils/generate_extended_grapheme_cluster_table.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_extended_grapheme_cluster_test.py b/libcxx/utils/generate_extended_grapheme_cluster_test.py index e0a6003ecd53..29a3e14014e8 100755 --- a/libcxx/utils/generate_extended_grapheme_cluster_test.py +++ b/libcxx/utils/generate_extended_grapheme_cluster_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 9d2e095ab9ff..13f40c7caa30 100644 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os from builtins import range diff --git a/libcxx/utils/generate_indic_conjunct_break_table.py b/libcxx/utils/generate_indic_conjunct_break_table.py index 774a51084917..7d01dc390968 100755 --- a/libcxx/utils/generate_indic_conjunct_break_table.py +++ b/libcxx/utils/generate_indic_conjunct_break_table.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_iwyu_mapping.py b/libcxx/utils/generate_iwyu_mapping.py index ab3e3f14e14d..35da70f62f26 100644 --- a/libcxx/utils/generate_iwyu_mapping.py +++ b/libcxx/utils/generate_iwyu_mapping.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import libcxx.header_information diff --git a/libcxx/utils/generate_width_estimation_table.py b/libcxx/utils/generate_width_estimation_table.py index 618612c61374..720a704ffba9 100644 --- a/libcxx/utils/generate_width_estimation_table.py +++ b/libcxx/utils/generate_width_estimation_table.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/run.py b/libcxx/utils/run.py index 6b4d615444bc..b97e1edf05a9 100755 --- a/libcxx/utils/run.py +++ b/libcxx/utils/run.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/ssh.py b/libcxx/utils/ssh.py index 77e79ce3d71f..65041757e54a 100755 --- a/libcxx/utils/ssh.py +++ b/libcxx/utils/ssh.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/sym_diff.py b/libcxx/utils/sym_diff.py index 8d2ff14c6542..c371c0b697b2 100755 --- a/libcxx/utils/sym_diff.py +++ b/libcxx/utils/sym_diff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.