@@ -108,7 +108,7 @@ def baz():
108108 script = make_script (script_dir , "perftest" , code )
109109 with subprocess .Popen (
110110 [sys .executable , "-Xperf" , script ],
111- universal_newlines = True ,
111+ text = True ,
112112 stderr = subprocess .PIPE ,
113113 stdout = subprocess .PIPE ,
114114 ) as process :
@@ -157,7 +157,7 @@ def baz():
157157 script = make_script (script_dir , "perftest" , code )
158158 with subprocess .Popen (
159159 [sys .executable , script ],
160- universal_newlines = True ,
160+ text = True ,
161161 stderr = subprocess .PIPE ,
162162 stdout = subprocess .PIPE ,
163163 ) as process :
@@ -211,7 +211,7 @@ def is_unwinding_reliable():
211211def perf_command_works ():
212212 try :
213213 cmd = ["perf" , "--help" ]
214- stdout = subprocess .check_output (cmd , universal_newlines = True )
214+ stdout = subprocess .check_output (cmd , text = True )
215215 except (subprocess .SubprocessError , OSError ):
216216 return False
217217
@@ -237,7 +237,7 @@ def perf_command_works():
237237 'print("hello")' ,
238238 )
239239 stdout = subprocess .check_output (
240- cmd , cwd = script_dir , universal_newlines = True , stderr = subprocess .STDOUT
240+ cmd , cwd = script_dir , text = True , stderr = subprocess .STDOUT
241241 )
242242 except (subprocess .SubprocessError , OSError ):
243243 return False
0 commit comments