◐ Shell
clean mode source ↗

bpo-35346, platform: replace os.popen() with subprocess by vstinner · Pull Request #10786 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

serhiy-storchaka

serhiy-storchaka

serhiy-storchaka

serhiy-storchaka

serhiy-storchaka

serhiy-storchaka

Replace os.popen() with subprocess.check_output() in the platform module:

* platform.uname() (_syscmd_ver() helper function) now redirects
  stderr to DEVNULL;
* Remove platform.DEV_NULL;
* _syscmd_uname() and _syscmd_file() no longer catch AttributeError.
  The "except AttributeError:" was only needed in Python 2, when
  os.popen() was not always available. In Python 3,
  subprocess.check_output() is always available.

vstinner added a commit that referenced this pull request

Dec 7, 2018

Labels