Skip to content

bpo-39763: Change test to check for subprocess.check_output during setup.py build phase #18847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/_aix_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# if not available, the config_vars are also definitely not available
# supply substitutes to bootstrap the build
try:
import subprocess
from subprocess import check_output
_have_subprocess = True
_tmp_bd = get_config_var("AIX_BUILDDATE")
_bgt = get_config_var("BUILD_GNU_TYPE")
Expand Down Expand Up @@ -50,7 +50,7 @@ def _aix_bosmp64():
"""
if _have_subprocess:
# We expect all AIX systems to have lslpp installed in this location
out = subprocess.check_output(["/usr/bin/lslpp", "-Lqc", "bos.mp64"])
out = check_output(["/usr/bin/lslpp", "-Lqc", "bos.mp64"])
out = out.decode("utf-8").strip().split(":") # type: ignore
# Use str() and int() to help mypy see types
return str(out[2]), int(out[-1])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Update test in `Lib/_aix_support.py` to check for `subprocess.check_output()` rather
than `subprocess` as a loadable module because 1ec63b62035e73111e204a0e03b83503e1c58f2e
now provides a minimal subprocess via setup.py.
Patch by M. Felt.