[Python-checkins] cpython (merge 3.1 -> 3.1): Branch merge

eric.araujo python-checkins at python.org
Sun May 29 18:14:33 CEST 2011


http://hg.python.org/cpython/rev/dba9d9dea06c
changeset:   70494:dba9d9dea06c
branch:      3.1
parent:      70471:bd49031b9488
parent:      70493:299b8a820002
user:        Éric Araujo <merwok at netwok.org>
date:        Sun May 29 17:56:20 2011 +0200
summary:
  Branch merge

files:
  Doc/c-api/veryhigh.rst               |   2 +-
  Doc/distutils/apiref.rst             |  18 ++++++++++++++-
  Doc/glossary.rst                     |   2 +-
  Doc/library/functions.rst            |   2 +-
  Doc/library/pprint.rst               |   6 ++--
  Lib/distutils/tests/test_build_py.py |  14 ++++++++----
  6 files changed, 31 insertions(+), 13 deletions(-)


diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -34,7 +34,7 @@
    according to the user's locale).  It is important to note that the
    argument list may be modified (but the contents of the strings
    pointed to by the argument list are not). The return value will be
-   ```0``` if the interpreter exits normally (ie, without an
+   ``0`` if the interpreter exits normally (i.e. without an
    exception), ``1`` if the interpreter exits due to an exception, or
    ``2`` if the parameter list does not represent a valid Python
    command line.
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst
--- a/Doc/distutils/apiref.rst
+++ b/Doc/distutils/apiref.rst
@@ -21,7 +21,7 @@
 .. function:: setup(arguments)
 
    The basic do-everything function that does most everything you could ever ask
-   for from a Distutils method. See XXXXX
+   for from a Distutils method.
 
    The setup function takes a large number of arguments. These are laid out in the
    following table.
@@ -1759,7 +1759,7 @@
    predicate)``, with *command_name* a string and *predicate* a function, a
    string or ``None``.  *predicate* is a method of the parent command that
    determines whether the corresponding command is applicable in the current
-   situation.  (E.g. we ``install_headers`` is only applicable if we have any C
+   situation.  (E.g. ``install_headers`` is only applicable if we have any C
    header files to install.)  If *predicate* is ``None``, that command is always
    applicable.
 
@@ -2006,3 +2006,17 @@
 This is described in more detail in :pep:`301`.
 
 .. % todo
+
+
+:mod:`distutils.command.check` --- Check the meta-data of a package
+===================================================================
+
+.. module:: distutils.command.check
+   :synopsis: Check the metadata of a package
+
+
+The ``check`` command performs some tests on the meta-data of a package.
+For example, it verifies that all required meta-data are provided as
+the arguments passed to the :func:`setup` function.
+
+.. % todo
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -242,7 +242,7 @@
       processing, remembering the location execution state (including local
       variables and pending try-statements).  When the generator resumes, it
       picks-up where it left-off (in contrast to functions which start fresh on
-      every invocation.
+      every invocation).
 
       .. index:: single: generator expression
 
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -527,7 +527,7 @@
    Two objects with non-overlapping lifetimes may have the same :func:`id`
    value.
 
-   .. impl-detail:: This is the address of the object.
+   .. impl-detail:: This is the address of the object in memory.
 
 
 .. function:: input([prompt])
diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -192,7 +192,7 @@
 -------
 
 To demonstrate several uses of the :func:`pprint` function and its parameters,
-let's fetch information about a package from PyPI::
+let's fetch information about a project from PyPI::
 
    >>> import json
    >>> import pprint
@@ -200,8 +200,8 @@
    >>> with urlopen('http://pypi.python.org/pypi/configparser/json') as url:
    ...     http_info = url.info()
    ...     raw_data = url.read().decode(http_info.get_content_charset())
-   >>> package_data = json.loads(raw_data)
-   >>> result = {'headers': http_info.items(), 'body': package_data}
+   >>> project_info = json.loads(raw_data)
+   >>> result = {'headers': http_info.items(), 'body': project_info}
 
 In its basic form, :func:`pprint` shows the whole object::
 
diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py
--- a/Lib/distutils/tests/test_build_py.py
+++ b/Lib/distutils/tests/test_build_py.py
@@ -57,11 +57,15 @@
         self.assertEqual(len(cmd.get_outputs()), 3)
         pkgdest = os.path.join(destination, "pkg")
         files = os.listdir(pkgdest)
-        self.assertTrue("__init__.py" in files)
-        self.assertTrue("__init__.pyc" in files)
-        self.assertTrue("README.txt" in files)
+        self.assertIn("__init__.py", files)
+        self.assertIn("README.txt", files)
+        # XXX even with -O, distutils writes pyc, not pyo; bug?
+        if sys.dont_write_bytecode:
+            self.assertNotIn("__init__.pyc", files)
+        else:
+            self.assertIn("__init__.pyc", files)
 
-    def test_empty_package_dir (self):
+    def test_empty_package_dir(self):
         # See SF 1668596/1720897.
         cwd = os.getcwd()
 
@@ -109,7 +113,7 @@
         finally:
             sys.dont_write_bytecode = old_dont_write_bytecode
 
-        self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
+        self.assertIn('byte-compiling is disabled', self.logs[0][1])
 
 def test_suite():
     return unittest.makeSuite(BuildPyTestCase)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list