File: python3.13-quote.diff

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,998,552 kB
  • sloc: cpp: 6,951,682; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,177; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (25 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
+++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
@@ -1,7 +1,10 @@
 #!/usr/bin/env python3
 
-import glob, os, pipes, sys, subprocess
-
+import glob, os, sys, subprocess
+try:
+    from pipes import quote
+except ImportError:
+    from shlex import quote
 
 device_id = os.environ.get("SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER")
 iossim_run_verbose = os.environ.get("SANITIZER_IOSSIM_RUN_VERBOSE")
@@ -49,8 +52,7 @@ if prog == "rm":
             # Don't quote glob pattern
             rm_args.append(arg)
         else:
-            # FIXME(dliew): pipes.quote() is deprecated
-            rm_args.append(pipes.quote(arg))
+            rm_args.append(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.