Skip to content

Commit 528619b

Browse files
committed
Issue python#26782: Add STARTUPINFO to subprocess.__all__ on Windows
1 parent 9015eb4 commit 528619b

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

Doc/whatsnew/3.6.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ Changes in the Python API
500500
attributes to match the documented APIs: :mod:`calendar`, :mod:`csv`,
501501
:mod:`~xml.etree.ElementTree`, :mod:`enum`,
502502
:mod:`fileinput`, :mod:`ftplib`, :mod:`logging`,
503-
:mod:`optparse`, :mod:`tarfile`, :mod:`threading` and
503+
:mod:`optparse`, :mod:`subprocess`, :mod:`tarfile`, :mod:`threading` and
504504
:mod:`wave`. This means they will export new symbols when ``import *``
505505
is used. See :issue:`23883`.
506506

Lib/subprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ class STARTUPINFO:
471471
__all__.extend(["CREATE_NEW_CONSOLE", "CREATE_NEW_PROCESS_GROUP",
472472
"STD_INPUT_HANDLE", "STD_OUTPUT_HANDLE",
473473
"STD_ERROR_HANDLE", "SW_HIDE",
474-
"STARTF_USESTDHANDLES", "STARTF_USESHOWWINDOW"])
474+
"STARTF_USESTDHANDLES", "STARTF_USESHOWWINDOW",
475+
"STARTUPINFO"])
475476

476477
class Handle(int):
477478
closed = False

Lib/test/test_subprocess.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,8 +2540,7 @@ def test_getoutput(self):
25402540

25412541
def test__all__(self):
25422542
"""Ensure that __all__ is populated properly."""
2543-
# STARTUPINFO added to __all__ in 3.6
2544-
intentionally_excluded = {"list2cmdline", "STARTUPINFO", "Handle"}
2543+
intentionally_excluded = {"list2cmdline", "Handle"}
25452544
exported = set(subprocess.__all__)
25462545
possible_exports = set()
25472546
import types

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ Core and Builtins
245245
Library
246246
-------
247247

248+
- Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows.
249+
248250
- Issue #26404: Add context manager to socketserver. Patch by Aviv Palivoda.
249251

250252
- Issue #26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading

0 commit comments

Comments
 (0)