From 4abe7107d1b8c662eb5a3235dcd0979500593f5b Mon Sep 17 00:00:00 2001 From: M Felt aka aixtools Date: Sun, 8 Mar 2020 10:35:15 +0000 Subject: [PATCH 1/3] Check for `subprocess.check_output()` rather than `subprocess` as a loadable module as 1ec63b62035e73111e204a0e03b83503e1c58f2e now provides a minimal `subprocess` via setup.py. --- Lib/_aix_support.py | 4 ++-- .../next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst 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-29-50.bpo-39763.yEI7A+.rst b/Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst new file mode 100644 index 00000000000000..df4a2f69d69158 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.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. From 7a5ad143e09c056ca5d7a065b63e634b34aa6708 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sun, 8 Mar 2020 10:43:23 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2020-03-08-10-43-22.bpo-39763.rBb9GN.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2020-03-08-10-43-22.bpo-39763.rBb9GN.rst 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 From bb79da9ad6c5a30819f1cd0fdc72a4321d726c81 Mon Sep 17 00:00:00 2001 From: M Felt aka aixtools Date: Sun, 8 Mar 2020 10:48:31 +0000 Subject: [PATCH 3/3] discard NEWS entry CI did not like --- .../next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst diff --git a/Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst b/Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst deleted file mode 100644 index df4a2f69d69158..00000000000000 --- a/Misc/NEWS.d/next/Library/2020-03-08-10-29-50.bpo-39763.yEI7A+.rst +++ /dev/null @@ -1,4 +0,0 @@ -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.