summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2012-12-23 22:53:21 (GMT)
committerBrian Curtin <brian@python.org>2012-12-23 22:53:21 (GMT)
commit445ad997ab7fd5ad8dd77250bb17c82ad40c1f1f (patch)
tree7bc829a888aa76693fe0c3431d8984fb1c2bae5d /Lib/subprocess.py
parent77377574dcecac2d5936f2418e36cd9de4d90247 (diff)
downloadcpython-445ad997ab7fd5ad8dd77250bb17c82ad40c1f1f.zip
cpython-445ad997ab7fd5ad8dd77250bb17c82ad40c1f1f.tar.gz
cpython-445ad997ab7fd5ad8dd77250bb17c82ad40c1f1f.tar.bz2
Fix #14470. Remove w9xpopen per PEP 11.
As stated in PEP 11, 3.4 removes code on Windows platforms where COMSPEC points to command.com. The w9xpopen project in Visual Studio was added to support that case, and there was a special case in subprocess to cover that situation. This change removes the w9xpopen project from the Visual Studio solution and removes any references to the w9xpopen executable.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index b042d26..0c60be1 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1029,23 +1029,6 @@ class Popen(object):
return Handle(h)
- def _find_w9xpopen(self):
- """Find and return absolut path to w9xpopen.exe"""
- w9xpopen = os.path.join(
- os.path.dirname(_winapi.GetModuleFileName(0)),
- "w9xpopen.exe")
- if not os.path.exists(w9xpopen):
- # Eeek - file-not-found - possibly an embedding
- # situation - see if we can locate it in sys.exec_prefix
- w9xpopen = os.path.join(os.path.dirname(sys.base_exec_prefix),
- "w9xpopen.exe")
- if not os.path.exists(w9xpopen):
- raise SubprocessError(
- "Cannot locate w9xpopen.exe, which is needed for "
- "Popen to work with your shell or platform.")
- return w9xpopen
-
-
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
@@ -1074,21 +1057,6 @@ class Popen(object):
startupinfo.wShowWindow = _winapi.SW_HIDE
comspec = os.environ.get("COMSPEC", "cmd.exe")
args = '{} /c "{}"'.format (comspec, args)
- if (_winapi.GetVersion() >= 0x80000000 or
- os.path.basename(comspec).lower() == "command.com"):
- # Win9x, or using command.com on NT. We need to
- # use the w9xpopen intermediate program. For more
- # information, see KB Q150956
- # (http://web.archive.org/web/20011105084002/http://support.microsoft.com/support/kb/articles/Q150/9/56.asp)
- w9xpopen = self._find_w9xpopen()
- args = '"%s" %s' % (w9xpopen, args)
- # Not passing CREATE_NEW_CONSOLE has been known to
- # cause random failures on win9x. Specifically a
- # dialog: "Your program accessed mem currently in
- # use at xxx" and a hopeful warning about the
- # stability of your system. Cost is Ctrl+C won't
- # kill children.
- creationflags |= _winapi.CREATE_NEW_CONSOLE
# Start the process
try: