[Python-checkins] r85249 - in python/branches/release31-maint: Doc/distutils/apiref.rst Doc/distutils/builtdist.rst Doc/distutils/setupscript.rst Doc/distutils/sourcedist.rst Doc/glossary.rst Doc/library/functions.rst Doc/library/multiprocessing.rst Doc/library/socket.rst Doc/library/sqlite3.rst Doc/library/struct.rst Lib/xml/dom/expatbuilder.py Modules/_io/_iomodule.c

georg.brandl python-checkins at python.org
Wed Oct 6 10:13:26 CEST 2010


Author: georg.brandl
Date: Wed Oct  6 10:13:26 2010
New Revision: 85249

Log:
Merged revisions 82629,82632,82724,82757-82758,82760-82763,82798-82799,82801 via svnmerge from 
svn+ssh://svn.python.org/python/branches/py3k

........
  r82629 | georg.brandl | 2010-07-07 20:51:43 +0200 (Mi, 07 Jul 2010) | 1 line
  
  Make comment out of an awkward note.
........
  r82632 | georg.brandl | 2010-07-07 21:04:36 +0200 (Mi, 07 Jul 2010) | 1 line
  
  Turn more notes into comments.
........
  r82724 | georg.brandl | 2010-07-09 09:33:15 +0200 (Fr, 09 Jul 2010) | 1 line
  
  2.7 is now stable.
........
  r82757 | georg.brandl | 2010-07-10 10:58:37 +0200 (Sa, 10 Jul 2010) | 1 line
  
  Fix markup.
........
  r82758 | georg.brandl | 2010-07-10 12:23:40 +0200 (Sa, 10 Jul 2010) | 1 line
  
  Emphasize role of count for Pascal string.
........
  r82760 | georg.brandl | 2010-07-10 12:39:57 +0200 (Sa, 10 Jul 2010) | 1 line
  
  #3214: improve description of duck-typing in glossary.
........
  r82761 | georg.brandl | 2010-07-10 13:40:13 +0200 (Sa, 10 Jul 2010) | 1 line
  
  #1434090: properly append child in expatbuilder doctype handler.
........
  r82762 | georg.brandl | 2010-07-10 13:51:06 +0200 (Sa, 10 Jul 2010) | 1 line
  
  #8338: fix outdated class name.
........
  r82763 | georg.brandl | 2010-07-10 14:01:34 +0200 (Sa, 10 Jul 2010) | 1 line
  
  #8456: fix signature of sqlite3.connect().
........
  r82798 | georg.brandl | 2010-07-11 11:23:11 +0200 (So, 11 Jul 2010) | 1 line
  
  #6774: explain shutdown() behavior varying with platform.
........
  r82799 | georg.brandl | 2010-07-11 11:26:57 +0200 (So, 11 Jul 2010) | 1 line
  
  Fix typo.
........
  r82801 | georg.brandl | 2010-07-11 11:33:39 +0200 (So, 11 Jul 2010) | 1 line
  
  #9184: fix default value for "buffering" param of open().
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Doc/distutils/apiref.rst
   python/branches/release31-maint/Doc/distutils/builtdist.rst
   python/branches/release31-maint/Doc/distutils/setupscript.rst
   python/branches/release31-maint/Doc/distutils/sourcedist.rst
   python/branches/release31-maint/Doc/glossary.rst
   python/branches/release31-maint/Doc/library/functions.rst
   python/branches/release31-maint/Doc/library/multiprocessing.rst
   python/branches/release31-maint/Doc/library/socket.rst
   python/branches/release31-maint/Doc/library/sqlite3.rst
   python/branches/release31-maint/Doc/library/struct.rst
   python/branches/release31-maint/Lib/xml/dom/expatbuilder.py
   python/branches/release31-maint/Modules/_io/_iomodule.c

Modified: python/branches/release31-maint/Doc/distutils/apiref.rst
==============================================================================
--- python/branches/release31-maint/Doc/distutils/apiref.rst	(original)
+++ python/branches/release31-maint/Doc/distutils/apiref.rst	Wed Oct  6 10:13:26 2010
@@ -995,7 +995,7 @@
    errors are ignored (apart from being reported to ``sys.stdout`` if *verbose* is
    true).
 
-**\*\*** Some of this could be replaced with the shutil module? **\*\***
+.. XXX Some of this could be replaced with the shutil module?
 
 
 :mod:`distutils.file_util` --- Single file operations
@@ -1311,8 +1311,7 @@
   the "negative alias" of :option:`--verbose`, then :option:`--quiet` on the
   command line sets *verbose* to false.
 
-**\*\*** Should be replaced with :mod:`optik` (which is also now known as
-:mod:`optparse` in Python 2.3 and later). **\*\***
+.. XXX Should be replaced with :mod:`optparse`.
 
 
 .. function:: fancy_getopt(options, negative_opt, object, args)

Modified: python/branches/release31-maint/Doc/distutils/builtdist.rst
==============================================================================
--- python/branches/release31-maint/Doc/distutils/builtdist.rst	(original)
+++ python/branches/release31-maint/Doc/distutils/builtdist.rst	Wed Oct  6 10:13:26 2010
@@ -146,8 +146,8 @@
 Creating dumb built distributions
 =================================
 
-**\*\*** Need to document absolute vs. prefix-relative packages here, but first
-I have to implement it! **\*\***
+.. XXX Need to document absolute vs. prefix-relative packages here, but first
+       I have to implement it!
 
 
 .. _creating-rpms:

Modified: python/branches/release31-maint/Doc/distutils/setupscript.rst
==============================================================================
--- python/branches/release31-maint/Doc/distutils/setupscript.rst	(original)
+++ python/branches/release31-maint/Doc/distutils/setupscript.rst	Wed Oct  6 10:13:26 2010
@@ -207,7 +207,7 @@
 SWIG on the interface file and compile the resulting C/C++ file into your
 extension.
 
-**\*\*** SWIG support is rough around the edges and largely untested! **\*\***
+.. XXX SWIG support is rough around the edges and largely untested!
 
 This warning notwithstanding, options to SWIG can be currently passed like
 this::
@@ -326,7 +326,7 @@
 (Again, this sort of non-portable construct should be avoided if you intend to
 distribute your code.)
 
-**\*\*** Should mention clib libraries here or somewhere else! **\*\***
+.. XXX Should mention clib libraries here or somewhere else!
 
 
 Other options

Modified: python/branches/release31-maint/Doc/distutils/sourcedist.rst
==============================================================================
--- python/branches/release31-maint/Doc/distutils/sourcedist.rst	(original)
+++ python/branches/release31-maint/Doc/distutils/sourcedist.rst	Wed Oct  6 10:13:26 2010
@@ -68,10 +68,10 @@
   :option:`packages` options
 
 * all C source files mentioned in the :option:`ext_modules` or
-  :option:`libraries` options (
+  :option:`libraries` options
 
-  **\*\*** getting C library sources currently broken---no
-  :meth:`get_source_files` method in :file:`build_clib.py`! **\*\***)
+  .. XXX Getting C library sources is currently broken -- no
+     :meth:`get_source_files` method in :file:`build_clib.py`!
 
 * scripts identified by the :option:`scripts` option
   See :ref:`distutils-installing-scripts`.

Modified: python/branches/release31-maint/Doc/glossary.rst
==============================================================================
--- python/branches/release31-maint/Doc/glossary.rst	(original)
+++ python/branches/release31-maint/Doc/glossary.rst	Wed Oct  6 10:13:26 2010
@@ -150,9 +150,9 @@
       object.
 
    duck-typing
-      A pythonic programming style which determines an object's type by inspection
-      of its method or attribute signature rather than by explicit relationship
-      to some type object ("If it looks like a duck and quacks like a duck, it
+      A programming style which does not look at an object's type to determine
+      if it has the right interface; instead, the method or attribute is simply
+      called or used ("If it looks like a duck and quacks like a duck, it
       must be a duck.")  By emphasizing interfaces rather than specific types,
       well-designed code improves its flexibility by allowing polymorphic
       substitution.  Duck-typing avoids tests using :func:`type` or

Modified: python/branches/release31-maint/Doc/library/functions.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/functions.rst	(original)
+++ python/branches/release31-maint/Doc/library/functions.rst	Wed Oct  6 10:13:26 2010
@@ -672,7 +672,7 @@
    :meth:`__index__` method that returns an integer.
 
 
-.. function:: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True)
+.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)
 
    Open *file* and return a corresponding stream.  If the file cannot be opened,
    an :exc:`IOError` is raised.

Modified: python/branches/release31-maint/Doc/library/multiprocessing.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/multiprocessing.rst	(original)
+++ python/branches/release31-maint/Doc/library/multiprocessing.rst	Wed Oct  6 10:13:26 2010
@@ -2217,8 +2217,8 @@
 
 
 An example of how a pool of worker processes can each run a
-:class:`SimpleHTTPServer.HttpServer` instance while sharing a single listening
-socket.
+:class:`~http.server.SimpleHTTPRequestHandler` instance while sharing a single
+listening socket.
 
 .. literalinclude:: ../includes/mp_webserver.py
 

Modified: python/branches/release31-maint/Doc/library/socket.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/socket.rst	(original)
+++ python/branches/release31-maint/Doc/library/socket.rst	Wed Oct  6 10:13:26 2010
@@ -741,7 +741,9 @@
    Shut down one or both halves of the connection.  If *how* is :const:`SHUT_RD`,
    further receives are disallowed.  If *how* is :const:`SHUT_WR`, further sends
    are disallowed.  If *how* is :const:`SHUT_RDWR`, further sends and receives are
-   disallowed.
+   disallowed.  Depending on the platform, shutting down one half of the connection
+   can also close the opposite half (e.g. on Mac OS X, ``shutdown(SHUT_WR)`` does
+   not allow further reads on the other end of the connection).
 
 Note that there are no methods :meth:`read` or :meth:`write`; use
 :meth:`~socket.recv` and :meth:`~socket.send` without *flags* argument instead.

Modified: python/branches/release31-maint/Doc/library/sqlite3.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/sqlite3.rst	(original)
+++ python/branches/release31-maint/Doc/library/sqlite3.rst	Wed Oct  6 10:13:26 2010
@@ -136,7 +136,7 @@
    first blank for the column name: the column name would simply be "x".
 
 
-.. function:: connect(database[, timeout, isolation_level, detect_types, factory])
+.. function:: connect(database[, timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements])
 
    Opens a connection to the SQLite database file *database*. You can use
    ``":memory:"`` to open a database connection to a database that resides in RAM

Modified: python/branches/release31-maint/Doc/library/struct.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/struct.rst	(original)
+++ python/branches/release31-maint/Doc/library/struct.rst	Wed Oct  6 10:13:26 2010
@@ -251,18 +251,16 @@
    In 3.0, some of the integer formats wrapped out-of-range values and
    raised :exc:`DeprecationWarning` instead of :exc:`struct.error`.
 
-
 The ``'p'`` format character encodes a "Pascal string", meaning a short
-variable-length string stored in a fixed number of bytes. The count is the total
-number of bytes stored.  The first byte stored is the length of the string, or
-255, whichever is smaller.  The bytes of the string follow.  If the string
-passed in to :func:`pack` is too long (longer than the count minus 1), only the
-leading count-1 bytes of the string are stored.  If the string is shorter than
-count-1, it is padded with null bytes so that exactly count bytes in all are
-used.  Note that for :func:`unpack`, the ``'p'`` format character consumes count
-bytes, but that the string returned can never contain more than 255 bytes.
-
-
+variable-length string stored in a *fixed number of bytes*, given by the count.
+The first byte stored is the length of the string, or 255, whichever is
+smaller.  The bytes of the string follow.  If the string passed in to
+:func:`pack` is too long (longer than the count minus 1), only the leading
+``count-1`` bytes of the string are stored.  If the string is shorter than
+``count-1``, it is padded with null bytes so that exactly count bytes in all
+are used.  Note that for :func:`unpack`, the ``'p'`` format character consumes
+``count`` bytes, but that the string returned can never contain more than 255
+bytes.
 
 For the ``'?'`` format character, the return value is either :const:`True` or
 :const:`False`. When packing, the truth value of the argument object is used.

Modified: python/branches/release31-maint/Lib/xml/dom/expatbuilder.py
==============================================================================
--- python/branches/release31-maint/Lib/xml/dom/expatbuilder.py	(original)
+++ python/branches/release31-maint/Lib/xml/dom/expatbuilder.py	Wed Oct  6 10:13:26 2010
@@ -242,7 +242,7 @@
         doctype = self.document.implementation.createDocumentType(
             doctypeName, publicId, systemId)
         doctype.ownerDocument = self.document
-        self.document.childNodes.append(doctype)
+        _append_child(self.document, doctype)
         self.document.doctype = doctype
         if self._filter and self._filter.acceptNode(doctype) == FILTER_REJECT:
             self.document.doctype = None

Modified: python/branches/release31-maint/Modules/_io/_iomodule.c
==============================================================================
--- python/branches/release31-maint/Modules/_io/_iomodule.c	(original)
+++ python/branches/release31-maint/Modules/_io/_iomodule.c	Wed Oct  6 10:13:26 2010
@@ -176,7 +176,7 @@
  * The main open() function
  */
 PyDoc_STRVAR(open_doc,
-"open(file, mode='r', buffering=None, encoding=None,\n"
+"open(file, mode='r', buffering=-1, encoding=None,\n"
 "     errors=None, newline=None, closefd=True) -> file object\n"
 "\n"
 "Open file and return a stream.  Raise IOError upon failure.\n"


More information about the Python-checkins mailing list