Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cb6fdf2c
Commit
cb6fdf2c
authored
Apr 07, 2015
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue10838: Rename the subprocess.mswindows internal global to _mswindows.
It is internal only, not a documented API.
parent
ace55865
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Lib/subprocess.py
Lib/subprocess.py
+6
-6
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+1
-1
No files found.
Lib/subprocess.py
View file @
cb6fdf2c
...
...
@@ -356,7 +356,7 @@ Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})
"""
import
sys
mswindows
=
(
sys
.
platform
==
"win32"
)
_
mswindows
=
(
sys
.
platform
==
"win32"
)
import
io
import
os
...
...
@@ -399,7 +399,7 @@ class TimeoutExpired(SubprocessError):
(
self
.
cmd
,
self
.
timeout
))
if
mswindows
:
if
_
mswindows
:
import
threading
import
msvcrt
import
_winapi
...
...
@@ -438,7 +438,7 @@ __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "getstatusoutput",
# NOTE: We intentionally exclude list2cmdline as it is
# considered an internal implementation detail. issue10838.
if
mswindows
:
if
_
mswindows
:
from
_winapi
import
(
CREATE_NEW_CONSOLE
,
CREATE_NEW_PROCESS_GROUP
,
STD_INPUT_HANDLE
,
STD_OUTPUT_HANDLE
,
STD_ERROR_HANDLE
,
SW_HIDE
,
...
...
@@ -765,7 +765,7 @@ class Popen(object):
if
not
isinstance
(
bufsize
,
int
):
raise
TypeError
(
"bufsize must be an integer"
)
if
mswindows
:
if
_
mswindows
:
if
preexec_fn
is
not
None
:
raise
ValueError
(
"preexec_fn is not supported on Windows "
"platforms"
)
...
...
@@ -825,7 +825,7 @@ class Popen(object):
# quickly terminating child could make our fds unwrappable
# (see #8458).
if
mswindows
:
if
_
mswindows
:
if
p2cwrite
!=
-
1
:
p2cwrite
=
msvcrt
.
open_osfhandle
(
p2cwrite
.
Detach
(),
0
)
if
c2pread
!=
-
1
:
...
...
@@ -1002,7 +1002,7 @@ class Popen(object):
raise
TimeoutExpired
(
self
.
args
,
orig_timeout
)
if
mswindows
:
if
_
mswindows
:
#
# Windows methods
#
...
...
Lib/test/test_subprocess.py
View file @
cb6fdf2c
...
...
@@ -2422,7 +2422,7 @@ class ProcessTestCaseNoPoll(ProcessTestCase):
def
test__all__
(
self
):
"""Ensure that __all__ is populated properly."""
intentionally_excluded
=
set
((
"list2cmdline"
,
"mswindows"
,
"MAXFD"
))
intentionally_excluded
=
set
((
"list2cmdline"
,))
exported
=
set
(
subprocess
.
__all__
)
possible_exports
=
set
()
import
types
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment