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

Skip to content

Commit 734e268

Browse files
committed
Merged revisions 65437,65469,65476,65480,65502,65528,65539,65543,65558,65561-65562,65565,65591,65601,65608,65610,65639 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r65437 | georg.brandl | 2008-08-03 22:28:55 +0000 (Sun, 03 Aug 2008) | 2 lines Note the removal of several committers. ........ r65469 | gregory.p.smith | 2008-08-04 01:03:50 +0000 (Mon, 04 Aug 2008) | 3 lines issue1606: Add warnings to the subprocess documentation about common pitfalls of using pipes that cause deadlocks. ........ r65476 | georg.brandl | 2008-08-04 06:29:36 +0000 (Mon, 04 Aug 2008) | 2 lines Fix markup. ........ r65480 | georg.brandl | 2008-08-04 07:31:50 +0000 (Mon, 04 Aug 2008) | 3 lines Clarify the meaning of the select() parameters and sync names with docstring. ........ r65502 | gregory.p.smith | 2008-08-04 18:34:07 +0000 (Mon, 04 Aug 2008) | 2 lines more cleanup ups of the recently added warnings in the subprocess docs. ........ r65528 | brett.cannon | 2008-08-04 21:52:25 +0000 (Mon, 04 Aug 2008) | 4 lines Add a note about all the modules/packages changed to silence -3 warnings. More changes are needed once some decisions are made, but this is the work up to this point. ........ r65539 | andrew.kuchling | 2008-08-05 01:38:08 +0000 (Tue, 05 Aug 2008) | 6 lines #3367 from Kristjan Valur Jonsson: If a PyTokenizer_FromString() is called with an empty string, the tokenizer's line_start member never gets initialized. Later, it is compared with the token pointer 'a' in parsetok.c:193 and that behavior can result in undefined behavior. ........ r65543 | andrew.kuchling | 2008-08-05 02:05:23 +0000 (Tue, 05 Aug 2008) | 1 line #3367: revert rev. 65539: this change causes test_parser to fail ........ r65558 | georg.brandl | 2008-08-06 17:20:41 +0000 (Wed, 06 Aug 2008) | 2 lines Fix longstringitem definition. #3505. ........ r65561 | mark.dickinson | 2008-08-06 20:12:30 +0000 (Wed, 06 Aug 2008) | 2 lines Docstring typo ........ r65562 | mark.dickinson | 2008-08-06 21:36:57 +0000 (Wed, 06 Aug 2008) | 2 lines Remove duplicate import ........ r65565 | andrew.kuchling | 2008-08-07 01:47:34 +0000 (Thu, 07 Aug 2008) | 1 line Add some items ........ r65591 | georg.brandl | 2008-08-08 06:42:20 +0000 (Fri, 08 Aug 2008) | 2 lines #3519: callee is an expression too. ........ r65601 | georg.brandl | 2008-08-08 15:34:34 +0000 (Fri, 08 Aug 2008) | 2 lines Remove mention of backquotes in the tutorial. ........ r65608 | guido.van.rossum | 2008-08-09 14:55:34 +0000 (Sat, 09 Aug 2008) | 2 lines Add news item about _sre.compile() re-bytecode validator. ........ r65610 | antoine.pitrou | 2008-08-09 17:27:23 +0000 (Sat, 09 Aug 2008) | 3 lines move NEWS entry to the appropriate section (oops!) ........ r65639 | georg.brandl | 2008-08-11 10:27:31 +0000 (Mon, 11 Aug 2008) | 2 lines #3540: fix exception name. ........
1 parent eaf8f7a commit 734e268

8 files changed

Lines changed: 70 additions & 26 deletions

File tree

Doc/library/mailbox.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ The following exception classes are defined in the :mod:`mailbox` module:
14781478
parameter set to ``False``), or when opening a folder that does not exist.
14791479

14801480

1481-
.. exception:: NotEmptyErrorError()
1481+
.. exception:: NotEmptyError()
14821482

14831483
Raised when a mailbox is not empty but is expected to be, such as when deleting
14841484
a folder that contains messages.

Doc/library/select.rst

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,24 @@ The module defines the following:
5252
:ref:`kevent-objects` below for the methods supported by kqueue objects.
5353

5454

55-
.. function:: select(iwtd, owtd, ewtd[, timeout])
55+
.. function:: select(rlist, wlist, xlist[, timeout])
5656

5757
This is a straightforward interface to the Unix :cfunc:`select` system call.
5858
The first three arguments are sequences of 'waitable objects': either
5959
integers representing file descriptors or objects with a parameterless method
60-
named :meth:`fileno` returning such an integer. The three sequences of
61-
waitable objects are for input, output and 'exceptional conditions',
62-
respectively. Empty sequences are allowed, but acceptance of three empty
63-
sequences is platform-dependent. (It is known to work on Unix but not on
64-
Windows.) The optional *timeout* argument specifies a time-out as a floating
65-
point number in seconds. When the *timeout* argument is omitted the function
66-
blocks until at least one file descriptor is ready. A time-out value of zero
67-
specifies a poll and never blocks.
60+
named :meth:`fileno` returning such an integer:
61+
62+
* *rlist*: wait until ready for reading
63+
* *wlist*: wait until ready for writing
64+
* *xlist*: wait for an "exceptional condition" (see the manual page for what
65+
your system considers such a condition)
66+
67+
Empty sequences are allowed, but acceptance of three empty sequences is
68+
platform-dependent. (It is known to work on Unix but not on Windows.) The
69+
optional *timeout* argument specifies a time-out as a floating point number
70+
in seconds. When the *timeout* argument is omitted the function blocks until
71+
at least one file descriptor is ready. A time-out value of zero specifies a
72+
poll and never blocks.
6873

6974
The return value is a triple of lists of objects that are ready: subsets of the
7075
first three arguments. When the time-out is reached without a file descriptor
@@ -84,9 +89,10 @@ The module defines the following:
8489

8590
.. index:: single: WinSock
8691

87-
File objects on Windows are not acceptable, but sockets are. On Windows, the
88-
underlying :cfunc:`select` function is provided by the WinSock library, and does
89-
not handle file descriptors that don't originate from WinSock.
92+
File objects on Windows are not acceptable, but sockets are. On Windows,
93+
the underlying :cfunc:`select` function is provided by the WinSock
94+
library, and does not handle file descriptors that don't originate from
95+
WinSock.
9096

9197

9298
.. _epoll-objects:

Doc/library/subprocess.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ Instances of the :class:`Popen` class have the following methods:
215215
Wait for child process to terminate. Set and return :attr:`returncode`
216216
attribute.
217217

218+
.. warning::
219+
220+
This will deadlock if the child process generates enough output to a
221+
stdout or stderr pipe such that it blocks waiting for the OS pipe buffer
222+
to accept more data. Use :meth:`communicate` to avoid that.
223+
218224

219225
.. method:: Popen.communicate(input=None)
220226

@@ -261,6 +267,14 @@ Instances of the :class:`Popen` class have the following methods:
261267

262268
The following attributes are also available:
263269

270+
.. warning::
271+
272+
Use :meth:`communicate` rather than :meth:`.stdin.write`,
273+
:meth:`.stdout.read` or :meth:`.stderr.read` to avoid deadlocks due
274+
to any of the other OS pipe buffers filling up and blocking the child
275+
process.
276+
277+
264278
.. attribute:: Popen.stdin
265279

266280
If the *stdin* argument is ``PIPE``, this attribute is a file object that

Doc/reference/expressions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ their suffixes::
12121212
(expr1, expr2, expr3, expr4)
12131213
{expr1: expr2, expr3: expr4}
12141214
expr1 + expr2 * (expr3 - expr4)
1215-
func(expr1, expr2, *expr3, **expr4)
1215+
expr1(expr2, expr3, *expr4, **expr5)
12161216
expr3, expr4 = expr1, expr2
12171217

12181218

Doc/whatsnew/2.6.rst

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ documentation for a :ref:`complete list <formatstrings>`; here's a sample::
785785
'%' - Percentage. Multiplies the number by 100 and displays
786786
in fixed ('f') format, followed by a percent sign.
787787

788-
Classes and types can define a __format__ method to control how they're
788+
Classes and types can define a :meth:`__format__` method to control how they're
789789
formatted. It receives a single argument, the format specifier::
790790

791791
def __format__(self, format_spec):
@@ -1515,10 +1515,22 @@ Here are all of the changes that Python 2.6 makes to the core Python language.
15151515
:func:`isnan`, return true if their floating-point argument is
15161516
infinite or Not A Number. (:issue:`1640`)
15171517

1518-
The float type has a new instance method :meth:`float.hex` and a
1519-
corresponding new class method :meth:`float.fromhex` to convert
1520-
floating-point numbers to and from hexadecimal strings,
1521-
respectively. (:issue:`3008`)
1518+
Conversion functions were added to convert floating-point numbers
1519+
into hexadecimal strings. (:issue:`3008`) These functions lets you
1520+
convert floats to and from a string representation without
1521+
introducing rounding errors from the conversion between decimal and
1522+
binary. Floats have a :meth:`hex` method that returns a string
1523+
representation, and the ``float.fromhex()`` method converts a string
1524+
back into a number::
1525+
1526+
>>> a = 3.75
1527+
>>> a.hex()
1528+
'0x1.e000000000000p+1'
1529+
>>> float.fromhex('0x1.e000000000000p+1')
1530+
3.75
1531+
>>> b=1./3
1532+
>>> b.hex()
1533+
'0x1.5555555555555p-2'
15221534

15231535
* The :mod:`math` module has a number of new functions, and the existing
15241536
functions have been improved to give more consistent behaviour
@@ -1633,6 +1645,12 @@ Optimizations
16331645
(Original optimization implemented by Armin Rigo, updated for
16341646
Python 2.6 by Kevin Jacobs; :issue:`1700288`.)
16351647

1648+
* Function calls that use keyword arguments
1649+
are significantly faster thanks to a patch that does a quick pointer
1650+
comparison, usually saving the time of a full string comparison.
1651+
(Contributed by Raymond Hettinger, after an initial implementation by
1652+
Antoine Pitrou; :issue:`1819`.)
1653+
16361654
* All of the functions in the :mod:`struct` module have been rewritten in
16371655
C, thanks to work at the Need For Speed sprint.
16381656
(Contributed by Raymond Hettinger.)

Lib/multiprocessing/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def Pipe(duplex=True):
209209

210210
class SocketListener(object):
211211
'''
212-
Represtation of a socket which is bound to an address and listening
212+
Representation of a socket which is bound to an address and listening
213213
'''
214214
def __init__(self, address, family, backlog=1):
215215
self._socket = socket.socket(getattr(socket, family))

Lib/test/test_multiprocessing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import multiprocessing.connection
2323
import multiprocessing.managers
2424
import multiprocessing.heap
25-
import multiprocessing.managers
2625
import multiprocessing.pool
2726
import _multiprocessing
2827

Misc/developers.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Permissions History
2020
- Antoine Pitrou was given SVN access on July 16 2008, by recommendation
2121
from GvR, for general contributions to Python.
2222

23-
- Jesse Noller was given SVN access on 16 June 2008 by Georg Brandl,
23+
- Jesse Noller was given SVN access on 16 June 2008 by GFB,
2424
for work on the multiprocessing module.
2525

2626
- Gregor Lingl was given SVN access on 10 June 2008 by MvL,
@@ -45,13 +45,13 @@ Permissions History
4545
for work on branches (ast/optimizer related).
4646

4747
- Jeroen Ruigrok van der Werven was given SVN access on 12 April 2008
48-
by Georg Brandl, for documentation work.
48+
by GFB, for documentation work.
4949

50-
- Josiah Carlson was given SVN access on 26 March 2008 by Georg Brandl,
50+
- Josiah Carlson was given SVN access on 26 March 2008 by GFB,
5151
for work on asyncore/asynchat.
5252

53-
- Benjamin Peterson was given SVN access on 25 March 2008 by Georg
54-
Brandl, for bug triage work.
53+
- Benjamin Peterson was given SVN access on 25 March 2008 by GFB,
54+
for bug triage work.
5555

5656
- Jerry Seutter was given SVN access on 20 March 2008 by BAC, for
5757
general contributions to Python.
@@ -196,6 +196,12 @@ Permissions History
196196
Permissions Dropped on Request
197197
------------------------------
198198

199+
- Roy Smith, Matt Fleming and Richard Emslie sent drop requests.
200+
4 Aug 2008 GFB
201+
202+
- Per note from Andrew Kuchling, the permissions for Gregory K Johnson
203+
and the Summer Of Code project are no longer needed. 4 Aug 2008 GFB
204+
199205
- Per note from Andrew Kuchling, the permissions for Gregory K Johnson
200206
and the Summer Of Code project are no longer needed. AMK will make
201207
any future checkins directly. 16 Oct 2005 RDH
@@ -235,3 +241,4 @@ RDH: Raymond Hettinger
235241
TGP: Tim Peters
236242
DJG: David Goodger
237243
MvL: Martin v. Loewis
244+
GFB: Georg Brandl

0 commit comments

Comments
 (0)