8000 gh-96143: subprocess API %s/universal_newlines=/text=/g. (GH-96468) · python/cpython@e93d1bd · GitHub
[go: up one dir, main page]

Skip to content

Commit e93d1bd

Browse files
authored
gh-96143: subprocess API %s/universal_newlines=/text=/g. (GH-96468)
minor missed test cleanup to use the modern API from the big review. Automerge-Triggered-By: GH:gpshead
1 parent 0cd33e1 commit e93d1bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_perf_profiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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():
211211
def 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

Comments
 (0)
0