diff --git a/Lib/_aix_support.py b/Lib/_aix_support.py index 2c5cd3297de30d..31e9d96355dcfd 100644 --- a/Lib/_aix_support.py +++ b/Lib/_aix_support.py @@ -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") @@ -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]) diff --git a/Misc/NEWS.d/next/Library/2020-03-08-10-43-22.bpo-39763.rBb9GN.rst b/Misc/NEWS.d/next/Library/2020-03-08-10-43-22.bpo-39763.rBb9GN.rst new file mode 100644 index 00000000000000..7e0c8ea5b41b88 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-03-08-10-43-22.bpo-39763.rBb9GN.rst @@ -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. \ No newline at end of file