summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/mailbox.rst2
-rw-r--r--Doc/library/select.rst30
-rw-r--r--Doc/library/subprocess.rst14
-rw-r--r--Doc/reference/expressions.rst2
-rw-r--r--Doc/whatsnew/2.6.rst28
-rw-r--r--Lib/multiprocessing/connection.py2
-rw-r--r--Lib/test/test_multiprocessing.py1
-rw-r--r--Misc/developers.txt17
8 files changed, 70 insertions, 26 deletions
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index e437b7a..9cea071 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -1478,7 +1478,7 @@ The following exception classes are defined in the :mod:`mailbox` module:
parameter set to ``False``), or when opening a folder that does not exist.
-.. exception:: NotEmptyErrorError()
+.. exception:: NotEmptyError()
Raised when a mailbox is not empty but is expected to be, such as when deleting
a folder that contains messages.
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
index f64d6dd..bf33c92 100644
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -52,19 +52,24 @@ The module defines the following:
:ref:`kevent-objects` below for the methods supported by kqueue objects.
-.. function:: select(iwtd, owtd, ewtd[, timeout])
+.. function:: select(rlist, wlist, xlist[, timeout])
This is a straightforward interface to the Unix :cfunc:`select` system call.
The first three arguments are sequences of 'waitable objects': either
integers representing file descriptors or objects with a parameterless method
- named :meth:`fileno` returning such an integer. The three sequences of
- waitable objects are for input, output and 'exceptional conditions',
- respectively. Empty sequences are allowed, but acceptance of three empty
- sequences is platform-dependent. (It is known to work on Unix but not on
- Windows.) The optional *timeout* argument specifies a time-out as a floating
- point number in seconds. When the *timeout* argument is omitted the function
- blocks until at least one file descriptor is ready. A time-out value of zero
- specifies a poll and never blocks.
+ named :meth:`fileno` returning such an integer:
+
+ * *rlist*: wait until ready for reading
+ * *wlist*: wait until ready for writing
+ * *xlist*: wait for an "exceptional condition" (see the manual page for what
+ your system considers such a condition)
+
+ Empty sequences are allowed, but acceptance of three empty sequences is
+ platform-dependent. (It is known to work on Unix but not on Windows.) The
+ optional *timeout* argument specifies a time-out as a floating point number
+ in seconds. When the *timeout* argument is omitted the function blocks until
+ at least one file descriptor is ready. A time-out value of zero specifies a
+ poll and never blocks.
The return value is a triple of lists of objects that are ready: subsets of the
first three arguments. When the time-out is reached without a file descriptor
@@ -84,9 +89,10 @@ The module defines the following:
.. index:: single: WinSock
- File objects on Windows are not acceptable, but sockets are. On Windows, the
- underlying :cfunc:`select` function is provided by the WinSock library, and does
- not handle file descriptors that don't originate from WinSock.
+ File objects on Windows are not acceptable, but sockets are. On Windows,
+ the underlying :cfunc:`select` function is provided by the WinSock
+ library, and does not handle file descriptors that don't originate from
+ WinSock.
.. _epoll-objects:
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index bd927c0..51cc577 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -215,6 +215,12 @@ Instances of the :class:`Popen` class have the following methods:
Wait for child process to terminate. Set and return :attr:`returncode`
attribute.
+ .. warning::
+
+ This will deadlock if the child process generates enough output to a
+ stdout or stderr pipe such that it blocks waiting for the OS pipe buffer
+ to accept more data. Use :meth:`communicate` to avoid that.
+
.. method:: Popen.communicate(input=None)
@@ -261,6 +267,14 @@ Instances of the :class:`Popen` class have the following methods:
The following attributes are also available:
+.. warning::
+
+ Use :meth:`communicate` rather than :meth:`.stdin.write`,
+ :meth:`.stdout.read` or :meth:`.stderr.read` to avoid deadlocks due
+ to any of the other OS pipe buffers filling up and blocking the child
+ process.
+
+
.. attribute:: Popen.stdin
If the *stdin* argument is ``PIPE``, this attribute is a file object that
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 43b0bf4..dab97e4 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -1212,7 +1212,7 @@ their suffixes::
(expr1, expr2, expr3, expr4)
{expr1: expr2, expr3: expr4}
expr1 + expr2 * (expr3 - expr4)
- func(expr1, expr2, *expr3, **expr4)
+ expr1(expr2, expr3, *expr4, **expr5)
expr3, expr4 = expr1, expr2
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 9959ecd..c0ecf01 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -785,7 +785,7 @@ documentation for a :ref:`complete list <formatstrings>`; here's a sample::
'%' - Percentage. Multiplies the number by 100 and displays
in fixed ('f') format, followed by a percent sign.
-Classes and types can define a __format__ method to control how they're
+Classes and types can define a :meth:`__format__` method to control how they're
formatted. It receives a single argument, the format specifier::
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.
:func:`isnan`, return true if their floating-point argument is
infinite or Not A Number. (:issue:`1640`)
- The float type has a new instance method :meth:`float.hex` and a
- corresponding new class method :meth:`float.fromhex` to convert
- floating-point numbers to and from hexadecimal strings,
- respectively. (:issue:`3008`)
+ Conversion functions were added to convert floating-point numbers
+ into hexadecimal strings. (:issue:`3008`) These functions lets you
+ convert floats to and from a string representation without
+ introducing rounding errors from the conversion between decimal and
+ binary. Floats have a :meth:`hex` method that returns a string
+ representation, and the ``float.fromhex()`` method converts a string
+ back into a number::
+
+ >>> a = 3.75
+ >>> a.hex()
+ '0x1.e000000000000p+1'
+ >>> float.fromhex('0x1.e000000000000p+1')
+ 3.75
+ >>> b=1./3
+ >>> b.hex()
+ '0x1.5555555555555p-2'
* The :mod:`math` module has a number of new functions, and the existing
functions have been improved to give more consistent behaviour
@@ -1633,6 +1645,12 @@ Optimizations
(Original optimization implemented by Armin Rigo, updated for
Python 2.6 by Kevin Jacobs; :issue:`1700288`.)
+* Function calls that use keyword arguments
+ are significantly faster thanks to a patch that does a quick pointer
+ comparison, usually saving the time of a full string comparison.
+ (Contributed by Raymond Hettinger, after an initial implementation by
+ Antoine Pitrou; :issue:`1819`.)
+
* All of the functions in the :mod:`struct` module have been rewritten in
C, thanks to work at the Need For Speed sprint.
(Contributed by Raymond Hettinger.)
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index 717e14e..b6f5bde 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -209,7 +209,7 @@ else:
class SocketListener(object):
'''
- Represtation of a socket which is bound to an address and listening
+ Representation of a socket which is bound to an address and listening
'''
def __init__(self, address, family, backlog=1):
self._socket = socket.socket(getattr(socket, family))
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 2841424..078d7fa 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -22,7 +22,6 @@ import multiprocessing.dummy
import multiprocessing.connection
import multiprocessing.managers
import multiprocessing.heap
-import multiprocessing.managers
import multiprocessing.pool
import _multiprocessing
diff --git a/Misc/developers.txt b/Misc/developers.txt
index 126da54..f5b157c 100644
--- a/Misc/developers.txt
+++ b/Misc/developers.txt
@@ -20,7 +20,7 @@ Permissions History
- Antoine Pitrou was given SVN access on July 16 2008, by recommendation
from GvR, for general contributions to Python.
-- Jesse Noller was given SVN access on 16 June 2008 by Georg Brandl,
+- Jesse Noller was given SVN access on 16 June 2008 by GFB,
for work on the multiprocessing module.
- Gregor Lingl was given SVN access on 10 June 2008 by MvL,
@@ -45,13 +45,13 @@ Permissions History
for work on branches (ast/optimizer related).
- Jeroen Ruigrok van der Werven was given SVN access on 12 April 2008
- by Georg Brandl, for documentation work.
+ by GFB, for documentation work.
-- Josiah Carlson was given SVN access on 26 March 2008 by Georg Brandl,
+- Josiah Carlson was given SVN access on 26 March 2008 by GFB,
for work on asyncore/asynchat.
-- Benjamin Peterson was given SVN access on 25 March 2008 by Georg
- Brandl, for bug triage work.
+- Benjamin Peterson was given SVN access on 25 March 2008 by GFB,
+ for bug triage work.
- Jerry Seutter was given SVN access on 20 March 2008 by BAC, for
general contributions to Python.
@@ -196,6 +196,12 @@ Permissions History
Permissions Dropped on Request
------------------------------
+- Roy Smith, Matt Fleming and Richard Emslie sent drop requests.
+ 4 Aug 2008 GFB
+
+- Per note from Andrew Kuchling, the permissions for Gregory K Johnson
+ and the Summer Of Code project are no longer needed. 4 Aug 2008 GFB
+
- Per note from Andrew Kuchling, the permissions for Gregory K Johnson
and the Summer Of Code project are no longer needed. AMK will make
any future checkins directly. 16 Oct 2005 RDH
@@ -235,3 +241,4 @@ RDH: Raymond Hettinger
TGP: Tim Peters
DJG: David Goodger
MvL: Martin v. Loewis
+GFB: Georg Brandl