Description: Patch out use of dead Python3 libraries pipes and cgi

--- a/llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
+++ b/llvm-project/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
@@ -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")
@@ -50,7 +50,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.
 
--- a/swift/utils/protocol_graph.py
+++ b/swift/utils/protocol_graph.py
@@ -23,7 +23,7 @@
 #
 # ===---------------------------------------------------------------------===//
 
-import cgi
+import html
 import os
 import re
 import sys
@@ -62,7 +62,7 @@
 
 def body_lines(body_text):
     return [
-        cgi.escape(b.group(0)) for b in
+        html.escape(b.group(0)) for b in
         re.finditer(
             r'(typealias\s*' + identifier +
             r'(\s*[:,]\s*' + identifier + ')?|' + operator + '.*)',
@@ -92,7 +92,7 @@
 
 def parse_generic_operator(m):
     generic_params = m.group(5)
-    generic_operator = cgi.escape(m.group(0).strip())
+    generic_operator = html.escape(m.group(0).strip())
     function_param_start = m.end(5) - m.start(0)
     function_params = generic_operator[function_param_start:]
     for m2 in re.finditer(
