[Python-checkins] platform: Import subprocess in function. (GH-27610)

methane webhook-mailer at python.org
Thu Aug 5 01:04:11 EDT 2021


https://github.com/python/cpython/commit/3e4cb7f40f28f1c49e0e4c3e841549c53065af3c
commit: 3e4cb7f40f28f1c49e0e4c3e841549c53065af3c
branch: main
author: Inada Naoki <songofacandy at gmail.com>
committer: methane <songofacandy at gmail.com>
date: 2021-08-05T14:04:01+09:00
summary:

platform: Import subprocess in function. (GH-27610)

files:
M Lib/platform.py

diff --git a/Lib/platform.py b/Lib/platform.py
index 39c8ad587a8b7..0f17964da4100 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -116,7 +116,6 @@
 import os
 import re
 import sys
-import subprocess
 import functools
 import itertools
 
@@ -748,6 +747,7 @@ def from_subprocess():
         """
         Fall back to `uname -p`
         """
+        import subprocess
         try:
             return subprocess.check_output(
                 ['uname', '-p'],



More information about the Python-checkins mailing list