Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1bc535d

Browse files
committed
Merged revisions 55328-55341 via svnmerge from
svn+ssh://[email protected]/python/branches/p3yk ........ r55329 | brett.cannon | 2007-05-14 16:36:56 -0700 (Mon, 14 May 2007) | 3 lines Implement the removal of tuple parameter unpacking (PEP 3113). Thanks, Tony Lownds for the patch. ........ r55331 | neal.norwitz | 2007-05-14 16:40:30 -0700 (Mon, 14 May 2007) | 1 line Update to use Python 3.0 ........ r55332 | brett.cannon | 2007-05-14 16:47:18 -0700 (Mon, 14 May 2007) | 2 lines Mention PEP 3113. And thanks to Tony Lownds for the PEP 3113 patch. ........ r55333 | neal.norwitz | 2007-05-14 16:57:06 -0700 (Mon, 14 May 2007) | 1 line Fix exception printing (no more exceptions module) ........ r55334 | neal.norwitz | 2007-05-14 17:11:10 -0700 (Mon, 14 May 2007) | 1 line Remove popen* functions from os ........ r55335 | neal.norwitz | 2007-05-14 18:03:38 -0700 (Mon, 14 May 2007) | 1 line Get rid of most of popen. There are still some uses I need to cleanup. ........ r55336 | neal.norwitz | 2007-05-14 21:11:34 -0700 (Mon, 14 May 2007) | 1 line Remove a few more remnants of the compiler package ........ r55337 | neal.norwitz | 2007-05-14 22:28:27 -0700 (Mon, 14 May 2007) | 1 line Get test_[cx]pickle working on 64-bit platforms (avoid overflow int/long) ........
1 parent 360e4b8 commit 1bc535d

64 files changed

Lines changed: 1459 additions & 2687 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/Makefile.deps

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
270270
lib/libimaplib.tex \
271271
lib/libpoplib.tex \
272272
lib/libcalendar.tex \
273-
lib/libpopen2.tex \
274273
lib/libbisect.tex \
275274
lib/libcollections.tex \
276275
lib/libheapq.tex \

Doc/lib/lib.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ \chapter*{Front Matter\label{front}}
280280
\input{libsubprocess}
281281
\input{libsocket}
282282
\input{libsignal}
283-
\input{libpopen2}
284283
\input{libasyncore}
285284
\input{libasynchat}
286285

Doc/lib/libitertools.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ \subsection{Examples \label{itertools-example}}
459459
# is differencing with a range so that consecutive numbers all appear in
460460
# same group.
461461
>>> data = [ 1, 4,5,6, 10, 15,16,17,18, 22, 25,26,27,28]
462-
>>> for k, g in groupby(enumerate(data), lambda (i,x):i-x):
462+
>>> for k, g in groupby(enumerate(data), lambda t:t[0]-t[1]):
463463
... print map(operator.itemgetter(1), g)
464464
...
465465
[1]

Doc/lib/libos.tex

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -378,68 +378,6 @@ \subsection{File Object Creation \label{os-newstreams}}
378378
Availability: Macintosh, \UNIX, Windows.
379379
\end{funcdesc}
380380

381-
There are a number of different \function{popen*()} functions that
382-
provide slightly different ways to create subprocesses.
383-
\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
384-
Use the \module{subprocess} module.}
385-
386-
For each of the \function{popen*()} variants, if \var{bufsize} is
387-
specified, it specifies the buffer size for the I/O pipes.
388-
\var{mode}, if provided, should be the string \code{'b'} or
389-
\code{'t'}; on Windows this is needed to determine whether the file
390-
objects should be opened in binary or text mode. The default value
391-
for \var{mode} is \code{'t'}.
392-
393-
Also, for each of these variants, on \UNIX, \var{cmd} may be a sequence, in
394-
which case arguments will be passed directly to the program without shell
395-
intervention (as with \function{os.spawnv()}). If \var{cmd} is a string it will
396-
be passed to the shell (as with \function{os.system()}).
397-
398-
These methods do not make it possible to retrieve the exit status from
399-
the child processes. The only way to control the input and output
400-
streams and also retrieve the return codes is to use the
401-
\refmodule{subprocess} module; these are only available on \UNIX.
402-
403-
For a discussion of possible deadlock conditions related to the use
404-
of these functions, see ``\ulink{Flow Control
405-
Issues}{popen2-flow-control.html}''
406-
(section~\ref{popen2-flow-control}).
407-
408-
\begin{funcdesc}{popen2}{cmd\optional{, mode\optional{, bufsize}}}
409-
Executes \var{cmd} as a sub-process. Returns the file objects
410-
\code{(\var{child_stdin}, \var{child_stdout})}.
411-
\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
412-
Use the \module{subprocess} module.}
413-
Availability: Macintosh, \UNIX, Windows.
414-
\versionadded{2.0}
415-
\end{funcdesc}
416-
417-
\begin{funcdesc}{popen3}{cmd\optional{, mode\optional{, bufsize}}}
418-
Executes \var{cmd} as a sub-process. Returns the file objects
419-
\code{(\var{child_stdin}, \var{child_stdout}, \var{child_stderr})}.
420-
\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
421-
Use the \module{subprocess} module.}
422-
Availability: Macintosh, \UNIX, Windows.
423-
\versionadded{2.0}
424-
\end{funcdesc}
425-
426-
\begin{funcdesc}{popen4}{cmd\optional{, mode\optional{, bufsize}}}
427-
Executes \var{cmd} as a sub-process. Returns the file objects
428-
\code{(\var{child_stdin}, \var{child_stdout_and_stderr})}.
429-
\deprecated{2.6}{All of the \function{popen*()} functions are obsolete.
430-
Use the \module{subprocess} module.}
431-
Availability: Macintosh, \UNIX, Windows.
432-
\versionadded{2.0}
433-
\end{funcdesc}
434-
435-
(Note that \code{\var{child_stdin}, \var{child_stdout}, and
436-
\var{child_stderr}} are named from the point of view of the child
437-
process, so \var{child_stdin} is the child's standard input.)
438-
439-
This functionality is also available in the \refmodule{popen2} module
440-
using functions of the same names, but the return values of those
441-
functions have a different order.
442-
443381

444382
\subsection{File Descriptor Operations \label{os-fd-ops}}
445383

@@ -1575,9 +1513,6 @@ \subsection{Process Management \label{os-process}}
15751513
\end{funcdesc}
15761514

15771515
\begin{funcdescni}{popen}{\unspecified}
1578-
\funclineni{popen2}{\unspecified}
1579-
\funclineni{popen3}{\unspecified}
1580-
\funclineni{popen4}{\unspecified}
15811516
Run child processes, returning opened pipes for communications. These
15821517
functions are described in section \ref{os-newstreams}.
15831518
\end{funcdescni}

Doc/lib/libpopen2.tex

Lines changed: 0 additions & 190 deletions
This file was deleted.

Doc/lib/libsubprocess.tex

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ \section{\module{subprocess} --- Subprocess management}
1515
\begin{verbatim}
1616
os.system
1717
os.spawn*
18-
os.popen*
19-
popen2.*
2018
commands.*
2119
\end{verbatim}
2220

@@ -335,68 +333,3 @@ \subsubsection{Replacing os.popen*}
335333
==>
336334
pipe = Popen(cmd, shell=True, bufsize=bufsize, stdin=PIPE).stdin
337335
\end{verbatim}
338-
339-
\begin{verbatim}
340-
(child_stdin, child_stdout) = os.popen2(cmd, mode, bufsize)
341-
==>
342-
p = Popen(cmd, shell=True, bufsize=bufsize,
343-
stdin=PIPE, stdout=PIPE, close_fds=True)
344-
(child_stdin, child_stdout) = (p.stdin, p.stdout)
345-
\end{verbatim}
346-
347-
\begin{verbatim}
348-
(child_stdin,
349-
child_stdout,
350-
child_stderr) = os.popen3(cmd, mode, bufsize)
351-
==>
352-
p = Popen(cmd, shell=True, bufsize=bufsize,
353-
stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
354-
(child_stdin,
355-
child_stdout,
356-
child_stderr) = (p.stdin, p.stdout, p.stderr)
357-
\end{verbatim}
358-
359-
\begin{verbatim}
360-
(child_stdin, child_stdout_and_stderr) = os.popen4(cmd, mode, bufsize)
361-
==>
362-
p = Popen(cmd, shell=True, bufsize=bufsize,
363-
stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
364-
(child_stdin, child_stdout_and_stderr) = (p.stdin, p.stdout)
365-
\end{verbatim}
366-
367-
\subsubsection{Replacing popen2.*}
368-
369-
\note{If the cmd argument to popen2 functions is a string, the command
370-
is executed through /bin/sh. If it is a list, the command is directly
371-
executed.}
372-
373-
\begin{verbatim}
374-
(child_stdout, child_stdin) = popen2.popen2("somestring", bufsize, mode)
375-
==>
376-
p = Popen(["somestring"], shell=True, bufsize=bufsize,
377-
stdin=PIPE, stdout=PIPE, close_fds=True)
378-
(child_stdout, child_stdin) = (p.stdout, p.stdin)
379-
\end{verbatim}
380-
381-
\begin{verbatim}
382-
(child_stdout, child_stdin) = popen2.popen2(["mycmd", "myarg"], bufsize, mode)
383-
==>
384-
p = Popen(["mycmd", "myarg"], bufsize=bufsize,
385-
stdin=PIPE, stdout=PIPE, close_fds=True)
386-
(child_stdout, child_stdin) = (p.stdout, p.stdin)
387-
\end{verbatim}
388-
389-
The popen2.Popen3 and popen2.Popen4 basically works as subprocess.Popen,
390-
except that:
391-
392-
\begin{itemize}
393-
\item subprocess.Popen raises an exception if the execution fails
394-
395-
\item the \var{capturestderr} argument is replaced with the \var{stderr}
396-
argument.
397-
398-
\item stdin=PIPE and stdout=PIPE must be specified.
399-
400-
\item popen2 closes all file descriptors by default, but you have to
401-
specify close_fds=True with subprocess.Popen.
402-
\end{itemize}

Doc/ref/ref3.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,9 @@ \section{The standard type hierarchy\label{types}}
498498
\lineiii{__closure__}{\code{None} or a tuple of cells that contain
499499
bindings for the function's free variables.}{Read-only}
500500

501-
\lineiii{__annotations__}{A dict containing annotations of parameters.}
502-
{Writable}
501+
\lineiii{__annotations__}{A dict containing annotations of parameters.
502+
The keys of the dict are the parameter names, or \code{'return'}
503+
for the return annotation, if provided.}{Writable}
503504

504505
\lineiii{__kwdefaults__}{A dict containing defaults for keyword-only
505506
parameters.}{Writable}

0 commit comments

Comments
 (0)