From: Martin Panter Date: Sat, 16 Apr 2016 23:42:37 +0000 (+0000) Subject: Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows X-Git-Tag: v3.6.0a1~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=528619b6c3a9cdf987397eacb4fbc36dec7c6433;p=thirdparty%2FPython%2Fcpython.git Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows --- diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index ef10ef24d696..adb8b73f94b7 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -500,7 +500,7 @@ Changes in the Python API attributes to match the documented APIs: :mod:`calendar`, :mod:`csv`, :mod:`~xml.etree.ElementTree`, :mod:`enum`, :mod:`fileinput`, :mod:`ftplib`, :mod:`logging`, - :mod:`optparse`, :mod:`tarfile`, :mod:`threading` and + :mod:`optparse`, :mod:`subprocess`, :mod:`tarfile`, :mod:`threading` and :mod:`wave`. This means they will export new symbols when ``import *`` is used. See :issue:`23883`. diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 640519d8dbb2..e9803497d581 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -471,7 +471,8 @@ if _mswindows: __all__.extend(["CREATE_NEW_CONSOLE", "CREATE_NEW_PROCESS_GROUP", "STD_INPUT_HANDLE", "STD_OUTPUT_HANDLE", "STD_ERROR_HANDLE", "SW_HIDE", - "STARTF_USESTDHANDLES", "STARTF_USESHOWWINDOW"]) + "STARTF_USESTDHANDLES", "STARTF_USESHOWWINDOW", + "STARTUPINFO"]) class Handle(int): closed = False diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index b5c86f295345..7f70fd000137 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -2540,8 +2540,7 @@ class MiscTests(unittest.TestCase): def test__all__(self): """Ensure that __all__ is populated properly.""" - # STARTUPINFO added to __all__ in 3.6 - intentionally_excluded = {"list2cmdline", "STARTUPINFO", "Handle"} + intentionally_excluded = {"list2cmdline", "Handle"} exported = set(subprocess.__all__) possible_exports = set() import types diff --git a/Misc/NEWS b/Misc/NEWS index af2d65413a3a..c02cd3a234da 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -245,6 +245,8 @@ Core and Builtins Library ------- +- Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows. + - Issue #26404: Add context manager to socketserver. Patch by Aviv Palivoda. - Issue #26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading