mirror of https://github.com/python/cpython.git
Remove warnings generated for the suprocess module when run under -3. Required
commenting out True/False compatbility stuff, remove a use of apply(), and remove a use of buffer() (just pulled the solution used in 3.0 which is direct slicing).
This commit is contained in:
parent
0563a8ffd1
commit
03446c43ca
|
@ -411,11 +411,11 @@ class pywintypes:
|
||||||
MAXFD = 256
|
MAXFD = 256
|
||||||
|
|
||||||
# True/False does not exist on 2.2.0
|
# True/False does not exist on 2.2.0
|
||||||
try:
|
#try:
|
||||||
False
|
# False
|
||||||
except NameError:
|
#except NameError:
|
||||||
False = 0
|
# False = 0
|
||||||
True = 1
|
# True = 1
|
||||||
|
|
||||||
_active = []
|
_active = []
|
||||||
|
|
||||||
|
@ -1066,7 +1066,7 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
|
||||||
if preexec_fn:
|
if preexec_fn:
|
||||||
apply(preexec_fn)
|
preexec_fn()
|
||||||
|
|
||||||
if env is None:
|
if env is None:
|
||||||
os.execvp(executable, args)
|
os.execvp(executable, args)
|
||||||
|
@ -1173,7 +1173,8 @@ def _communicate(self, input):
|
||||||
# When select has indicated that the file is writable,
|
# When select has indicated that the file is writable,
|
||||||
# we can write up to PIPE_BUF bytes without risk
|
# we can write up to PIPE_BUF bytes without risk
|
||||||
# blocking. POSIX defines PIPE_BUF >= 512
|
# blocking. POSIX defines PIPE_BUF >= 512
|
||||||
bytes_written = os.write(self.stdin.fileno(), buffer(input, input_offset, 512))
|
chunk = input[input_offset : input_offset + 512]
|
||||||
|
bytes_written = os.write(self.stdin.fileno(), chunk)
|
||||||
input_offset += bytes_written
|
input_offset += bytes_written
|
||||||
if input_offset >= len(input):
|
if input_offset >= len(input):
|
||||||
self.stdin.close()
|
self.stdin.close()
|
||||||
|
|
|
@ -48,8 +48,9 @@ Library
|
||||||
while running under the ``-3`` flag: aifc, asyncore, bdb, bsddb,
|
while running under the ``-3`` flag: aifc, asyncore, bdb, bsddb,
|
||||||
ConfigParser, cookielib, DocXMLRPCServer, email, filecmp, fileinput, inspect,
|
ConfigParser, cookielib, DocXMLRPCServer, email, filecmp, fileinput, inspect,
|
||||||
logging, modulefinder, pdb, pickle, profile, pstats, pydoc, re, rlcompleter,
|
logging, modulefinder, pdb, pickle, profile, pstats, pydoc, re, rlcompleter,
|
||||||
SimpleXMLRPCServer, shelve, sqlite3, tarfile, Tkinter, test.test_support,
|
SimpleXMLRPCServer, shelve, subprocess, sqlite3, tarfile, Tkinter,
|
||||||
textwrap, threading, tokenize, traceback, urlparse, wsgiref, xml, xmlrpclib.
|
test.test_support, textwrap, threading, tokenize, traceback, urlparse,
|
||||||
|
wsgiref, xml, xmlrpclib.
|
||||||
|
|
||||||
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
|
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
|
||||||
raised an AttributeError.
|
raised an AttributeError.
|
||||||
|
|
Loading…
Reference in New Issue