diff --color -Naur llvm-project/clang/utils/creduce-clang-crash.py llvm-project/clang/utils/creduce-clang-crash.py --- llvm-project/clang/utils/creduce-clang-crash.py 2024-06-20 13:38:53.943180833 -0500 +++ llvm-project/clang/utils/creduce-clang-crash.py 2024-06-20 13:42:30.244711005 -0500 @@ -14,7 +14,6 @@ import stat import sys import subprocess -import pipes import shlex import tempfile import shutil @@ -57,7 +56,7 @@ sys.exit("ERROR: `%s` not found in %s" % (cmd_name, cmd_dir)) def quote_cmd(cmd): - return ' '.join(pipes.quote(arg) for arg in cmd) + return ' '.join(shlex.quote(arg) for arg in cmd) def write_to_script(text, filename): with open(filename, 'w') as f: @@ -199,7 +198,7 @@ """ % (disable_symbolization, quote_cmd(self.get_crash_cmd())) for msg in self.expected_output: - output += 'grep -F %s t.log || exit 1\n' % pipes.quote(msg) + output += 'grep -F %s t.log || exit 1\n' % shlex.quote(msg) write_to_script(output, self.testfile) self.check_interestingness() diff --color -Naur llvm-project/compiler-rt/test/asan/lit.cfg.py llvm-project/compiler-rt/test/asan/lit.cfg.py --- llvm-project/compiler-rt/test/asan/lit.cfg.py 2024-06-20 13:38:17.808753484 -0500 +++ llvm-project/compiler-rt/test/asan/lit.cfg.py 2024-06-20 13:43:18.446949016 -0500 @@ -6,14 +6,8 @@ import lit.formats -# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if -# it's not available. -try: - import shlex - sh_quote = shlex.quote -except: - import pipes - sh_quote = pipes.quote +import shlex +sh_quote = shlex.quote def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) diff --color -Naur llvm-project/compiler-rt/test/lit.common.cfg.py llvm-project/compiler-rt/test/lit.common.cfg.py --- llvm-project/compiler-rt/test/lit.common.cfg.py 2024-06-20 13:38:17.788752141 -0500 +++ llvm-project/compiler-rt/test/lit.common.cfg.py 2024-06-20 13:43:44.961730162 -0500 @@ -12,14 +12,8 @@ import lit.formats import lit.util -# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if -# it's not available. -try: - import shlex - sh_quote = shlex.quote -except: - import pipes - sh_quote = pipes.quote +import shlex +sh_quote = shlex.quote def find_compiler_libdir(): """ diff --color -Naur llvm-project/compiler-rt/test/memprof/lit.cfg.py llvm-project/compiler-rt/test/memprof/lit.cfg.py --- llvm-project/compiler-rt/test/memprof/lit.cfg.py 2024-06-20 13:38:17.852756440 -0500 +++ llvm-project/compiler-rt/test/memprof/lit.cfg.py 2024-06-20 13:44:09.179356996 -0500 @@ -6,14 +6,8 @@ import lit.formats -# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if -# it's not available. -try: - import shlex - sh_quote = shlex.quote -except: - import pipes - sh_quote = pipes.quote +import shlex +sh_quote = shlex.quote def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) diff --color -Naur llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py --- llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py 2024-06-20 13:38:17.946762755 -0500 +++ llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py 2024-06-20 13:48:37.348371396 -0500 @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import glob, os, pipes, sys, subprocess +import glob, os, shlex, sys, subprocess device_id = os.environ.get('SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER') @@ -39,7 +39,7 @@ rm_args.append(arg) else: # FIXME(dliew): pipes.quote() is deprecated - rm_args.append(pipes.quote(arg)) + rm_args.append(shlex.quote(arg)) rm_cmd_line = ["/bin/rm"] + rm_args rm_cmd_line_str = ' '.join(rm_cmd_line) # We use `shell=True` so that any wildcard globs get expanded by the shell. diff --color -Naur llvm-project/libcxx/utils/libcxx/test/config.py llvm-project/libcxx/utils/libcxx/test/config.py --- llvm-project/libcxx/utils/libcxx/test/config.py 2024-06-20 13:38:59.394547032 -0500 +++ llvm-project/libcxx/utils/libcxx/test/config.py 2024-06-20 13:45:49.931125052 -0500 @@ -9,7 +9,6 @@ import copy import os import pkgutil -import pipes import platform import re import shlex @@ -434,7 +433,7 @@ def quote(self, s): if platform.system() == 'Windows': return lit.TestRunner.quote_windows_command([s]) - return pipes.quote(s) + return shlex.quote(s) def configure_substitutions(self): sub = self.config.substitutions diff --color -Naur llvm-project/libcxx/utils/libcxx/test/dsl.py llvm-project/libcxx/utils/libcxx/test/dsl.py --- llvm-project/libcxx/utils/libcxx/test/dsl.py 2024-06-20 13:38:59.394547032 -0500 +++ llvm-project/libcxx/utils/libcxx/test/dsl.py 2024-06-20 13:45:11.318531231 -0500 @@ -8,7 +8,7 @@ import os import pickle -import pipes +import shlex import platform import re import shutil @@ -261,7 +261,7 @@ } #endif """ - return programSucceeds(config, program, args=[pipes.quote(l) for l in locales]) + return programSucceeds(config, program, args=[shlex.quote(l) for l in locales]) @_memoizeExpensiveOperation(lambda c, flags='': (c.substitutions, c.environment, flags)) def compilerMacros(config, flags=''): diff --color -Naur llvm-project/libcxx/utils/libcxx/test/format.py llvm-project/libcxx/utils/libcxx/test/format.py --- llvm-project/libcxx/utils/libcxx/test/format.py 2024-06-20 13:38:59.394547032 -0500 +++ llvm-project/libcxx/utils/libcxx/test/format.py 2024-06-20 13:45:31.689899688 -0500 @@ -9,7 +9,7 @@ import lit import lit.formats import os -import pipes +import shlex import re import shutil diff --color -Naur ninja/configure.py ninja/configure.py --- ninja/configure.py 2024-06-20 13:38:14.957561954 -0500 +++ ninja/configure.py 2024-06-20 13:46:12.859665292 -0500 @@ -23,7 +23,7 @@ from optparse import OptionParser import os -import pipes +import shlex import string import subprocess import sys @@ -264,7 +264,7 @@ env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS']) configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys) if configure_env: - config_str = ' '.join([k + '=' + pipes.quote(configure_env[k]) + config_str = ' '.join([k + '=' + shlex.quote(configure_env[k]) for k in configure_env]) n.variable('configure_env', config_str + '$ ') n.newline() diff --color -Naur swift/utils/build_swift/build_swift/shell.py swift/utils/build_swift/build_swift/shell.py --- swift/utils/build_swift/build_swift/shell.py 2024-06-20 13:39:16.267680494 -0500 +++ swift/utils/build_swift/build_swift/shell.py 2024-06-20 13:47:56.850650939 -0500 @@ -23,7 +23,7 @@ import sys from copy import copy as _copy from pathlib import Path -from pipes import quote as _quote +from shlex import quote as _quote from shlex import split from subprocess import CalledProcessError diff --color -Naur swift/utils/sil-opt-verify-all-modules.py swift/utils/sil-opt-verify-all-modules.py --- swift/utils/sil-opt-verify-all-modules.py 2024-06-20 13:39:17.951793627 -0500 +++ swift/utils/sil-opt-verify-all-modules.py 2024-06-20 13:40:50.278995757 -0500 @@ -13,7 +13,7 @@ import glob import multiprocessing import os -import pipes +import shlex import subprocess import sys import tempfile @@ -91,7 +91,7 @@ def quote_shell_command(args): - return " ".join([pipes.quote(a) for a in args]) + return " ".join([shlex.quote(a) for a in args]) def run_commands_in_parallel(commands): diff --color -Naur swift/utils/swift_build_support/swift_build_support/build_script_invocation.py swift/utils/swift_build_support/swift_build_support/build_script_invocation.py --- swift/utils/swift_build_support/swift_build_support/build_script_invocation.py 2024-06-20 13:39:16.270680695 -0500 +++ swift/utils/swift_build_support/swift_build_support/build_script_invocation.py 2024-06-20 13:41:40.348359192 -0500 @@ -11,7 +11,7 @@ # ===---------------------------------------------------------------------===# import os -import pipes +import shlex import platform from build_swift.build_swift import argparse @@ -128,9 +128,9 @@ "--build-jobs", str(args.build_jobs), "--lit-jobs", str(args.lit_jobs), "--common-cmake-options=%s" % ' '.join( - pipes.quote(opt) for opt in cmake.common_options()), + shlex.quote(opt) for opt in cmake.common_options()), "--build-args=%s" % ' '.join( - pipes.quote(arg) for arg in cmake.build_args()), + shlex.quote(arg) for arg in cmake.build_args()), "--dsymutil-jobs", str(args.dsymutil_jobs), ] @@ -388,7 +388,7 @@ if args.extra_cmake_options: impl_args += [ "--extra-cmake-options=%s" % ' '.join( - pipes.quote(opt) for opt in args.extra_cmake_options) + shlex.quote(opt) for opt in args.extra_cmake_options) ] if args.lto_type is not None: diff --color -Naur swift/utils/swift_build_support/swift_build_support/shell.py swift/utils/swift_build_support/swift_build_support/shell.py --- swift/utils/swift_build_support/swift_build_support/shell.py 2024-06-20 13:39:16.271680762 -0500 +++ swift/utils/swift_build_support/swift_build_support/shell.py 2024-06-20 13:42:02.214828084 -0500 @@ -14,7 +14,7 @@ # ---------------------------------------------------------------------------- import os -import pipes +import shlex import platform import shutil import subprocess @@ -35,7 +35,7 @@ def _quote(arg): - return pipes.quote(str(arg)) + return shlex.quote(str(arg)) def quote_command(args):