From be02db4545537cd6771afccc31bc601f10aa90de Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 10 Jun 2019 12:21:38 +0100 Subject: [PATCH 1/3] Replace backquote with POSIXy command substitution --- Doc/library/subprocess.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index ede5c3c5a369e3..94e874c7a18296 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1159,12 +1159,12 @@ In the following examples, we assume that the relevant functions have already been imported from the :mod:`subprocess` module. -Replacing /bin/sh shell backquote -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Replacing /bin/sh shell command substitution +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash - output=`mycmd myarg` + output=$(mycmd myarg) becomes:: @@ -1175,7 +1175,7 @@ Replacing shell pipeline .. code-block:: bash - output=`dmesg | grep hda` + output=$(dmesg | grep hda) becomes:: @@ -1192,7 +1192,7 @@ be used directly: .. code-block:: bash - output=`dmesg | grep hda` + output=$(dmesg | grep hda) becomes:: From 599e1e588c99204d6a04e020bb82275a1300afc0 Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 10 Jun 2019 12:33:12 +0100 Subject: [PATCH 2/3] Add the :program: role --- Doc/library/subprocess.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 94e874c7a18296..a10a45ea16a6b3 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1159,8 +1159,8 @@ In the following examples, we assume that the relevant functions have already been imported from the :mod:`subprocess` module. -Replacing /bin/sh shell command substitution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Replacing :program:`/bin/sh` shell command substitution +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash From 09a36ade52f97770d4ac815d030192be85c2db22 Mon Sep 17 00:00:00 2001 From: David Jones Date: Wed, 12 Jun 2019 14:34:33 +0100 Subject: [PATCH 3/3] Remove newly unused rules --- Doc/tools/susp-ignored.csv | 2 -- 1 file changed, 2 deletions(-) diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv index 85263d47c8bba8..9129ee85d7e279 100644 --- a/Doc/tools/susp-ignored.csv +++ b/Doc/tools/susp-ignored.csv @@ -216,8 +216,6 @@ library/stdtypes,,:len,s[len(s):len(s)] library/stdtypes,,::,>>> y = m[::2] library/stdtypes,,::,>>> z = y[::-2] library/string,,`,"!""#$%&'()*+,-./:;<=>?@[\]^_`{|}~" -library/subprocess,,`,"output=`dmesg | grep hda`" -library/subprocess,,`,"output=`mycmd myarg`" library/tarfile,,:bz2, library/tarfile,,:compression,filemode[:compression] library/tarfile,,:gz,