• Jason Madden's avatar
    Implement subprocess.run() · 78558892
    Jason Madden authored
    Make it available to all Python versions, not just 3.5. It is
    cooperative on all versions.
    
    This requires some minor updates to the Popen API (being a context
    manager and having the args attribute on Python 2) and works best when
    the TimeoutExpired exception is also defined in Python 2 (as a subclass
    of Timeout, for BWC).
    
    This prompts me to wonder if some of the duplicated Py2/Py3
    methods (like check_call) can be combined now. I think I'm generally OK
    with API extensions so long as there are no BWC concerns, and the
    context-management, in particular, is nice for those methods.
    
    Fixes #872.
    78558892
test__subprocess.py 12.8 KB