summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-05-29 15:56:20 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-05-29 15:56:20 (GMT)
commite4427bf9c9ff096ab10589b7aba1e2a6f9c3093f (patch)
treeb0927965c569c48629d50baa4b2d6915956ff56b
parentd5a91961dd0e501a448ec3a048146132121c24c6 (diff)
parent87418afb3b6c6ef220df439004501093609abb2e (diff)
downloadcpython-e4427bf9c9ff096ab10589b7aba1e2a6f9c3093f.zip
cpython-e4427bf9c9ff096ab10589b7aba1e2a6f9c3093f.tar.gz
cpython-e4427bf9c9ff096ab10589b7aba1e2a6f9c3093f.tar.bz2
Branch merge
-rw-r--r--Doc/c-api/veryhigh.rst2
-rw-r--r--Doc/distutils/apiref.rst18
-rw-r--r--Doc/glossary.rst2
-rw-r--r--Doc/library/functions.rst2
-rw-r--r--Doc/library/pprint.rst6
-rw-r--r--Lib/distutils/tests/test_build_py.py16
6 files changed, 32 insertions, 14 deletions
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
index d1940a8..73cd1d2 100644
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -34,7 +34,7 @@ the same library that the Python runtime is using.
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
index 81de1ad..712fffb 100644
--- a/Doc/distutils/apiref.rst
+++ b/Doc/distutils/apiref.rst
@@ -21,7 +21,7 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
.. 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 @@ Subclasses of :class:`Command` must define the following methods.
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 @@ The ``register`` command registers the package with the Python Package Index.
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
index 7431545..6a4daa5 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -242,7 +242,7 @@ Glossary
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
index 1547f6d..42f2bc9 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -527,7 +527,7 @@ are always available. They are listed here in alphabetical order.
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
index 7bebd8c..4169b64 100644
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -192,7 +192,7 @@ Example
-------
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 @@ let's fetch information about a package from PyPI::
>>> 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
index da3232c..4e46339 100644
--- a/Lib/distutils/tests/test_build_py.py
+++ b/Lib/distutils/tests/test_build_py.py
@@ -57,11 +57,15 @@ class BuildPyTestCase(support.TempdirManager,
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)
-
- def test_empty_package_dir (self):
+ 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):
# See SF 1668596/1720897.
cwd = os.getcwd()
@@ -109,7 +113,7 @@ class BuildPyTestCase(support.TempdirManager,
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)