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

Skip to content

Commit e4427bf

Browse files
committed
Branch merge
2 parents d5a9196 + 87418af commit e4427bf

6 files changed

Lines changed: 32 additions & 14 deletions

File tree

Doc/c-api/veryhigh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ the same library that the Python runtime is using.
3434
according to the user's locale). It is important to note that the
3535
argument list may be modified (but the contents of the strings
3636
pointed to by the argument list are not). The return value will be
37-
```0``` if the interpreter exits normally (ie, without an
37+
``0`` if the interpreter exits normally (i.e. without an
3838
exception), ``1`` if the interpreter exits due to an exception, or
3939
``2`` if the parameter list does not represent a valid Python
4040
command line.

Doc/distutils/apiref.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
2121
.. function:: setup(arguments)
2222

2323
The basic do-everything function that does most everything you could ever ask
24-
for from a Distutils method. See XXXXX
24+
for from a Distutils method.
2525

2626
The setup function takes a large number of arguments. These are laid out in the
2727
following table.
@@ -1759,7 +1759,7 @@ Subclasses of :class:`Command` must define the following methods.
17591759
predicate)``, with *command_name* a string and *predicate* a function, a
17601760
string or ``None``. *predicate* is a method of the parent command that
17611761
determines whether the corresponding command is applicable in the current
1762-
situation. (E.g. we ``install_headers`` is only applicable if we have any C
1762+
situation. (E.g. ``install_headers`` is only applicable if we have any C
17631763
header files to install.) If *predicate* is ``None``, that command is always
17641764
applicable.
17651765

@@ -2006,3 +2006,17 @@ The ``register`` command registers the package with the Python Package Index.
20062006
This is described in more detail in :pep:`301`.
20072007

20082008
.. % todo
2009+
2010+
2011+
:mod:`distutils.command.check` --- Check the meta-data of a package
2012+
===================================================================
2013+
2014+
.. module:: distutils.command.check
2015+
:synopsis: Check the metadata of a package
2016+
2017+
2018+
The ``check`` command performs some tests on the meta-data of a package.
2019+
For example, it verifies that all required meta-data are provided as
2020+
the arguments passed to the :func:`setup` function.
2021+
2022+
.. % todo

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Glossary
242242
processing, remembering the location execution state (including local
243243
variables and pending try-statements). When the generator resumes, it
244244
picks-up where it left-off (in contrast to functions which start fresh on
245-
every invocation.
245+
every invocation).
246246

247247
.. index:: single: generator expression
248248

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ are always available. They are listed here in alphabetical order.
527527
Two objects with non-overlapping lifetimes may have the same :func:`id`
528528
value.
529529

530-
.. impl-detail:: This is the address of the object.
530+
.. impl-detail:: This is the address of the object in memory.
531531

532532

533533
.. function:: input([prompt])

Doc/library/pprint.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,16 @@ Example
192192
-------
193193

194194
To demonstrate several uses of the :func:`pprint` function and its parameters,
195-
let's fetch information about a package from PyPI::
195+
let's fetch information about a project from PyPI::
196196

197197
>>> import json
198198
>>> import pprint
199199
>>> from urllib.request import urlopen
200200
>>> with urlopen('http://pypi.python.org/pypi/configparser/json') as url:
201201
... http_info = url.info()
202202
... raw_data = url.read().decode(http_info.get_content_charset())
203-
>>> package_data = json.loads(raw_data)
204-
>>> result = {'headers': http_info.items(), 'body': package_data}
203+
>>> project_info = json.loads(raw_data)
204+
>>> result = {'headers': http_info.items(), 'body': project_info}
205205

206206
In its basic form, :func:`pprint` shows the whole object::
207207

Lib/distutils/tests/test_build_py.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ def test_package_data(self):
5757
self.assertEqual(len(cmd.get_outputs()), 3)
5858
pkgdest = os.path.join(destination, "pkg")
5959
files = os.listdir(pkgdest)
60-
self.assertTrue("__init__.py" in files)
61-
self.assertTrue("__init__.pyc" in files)
62-
self.assertTrue("README.txt" in files)
63-
64-
def test_empty_package_dir (self):
60+
self.assertIn("__init__.py", files)
61+
self.assertIn("README.txt", files)
62+
# XXX even with -O, distutils writes pyc, not pyo; bug?
63+
if sys.dont_write_bytecode:
64+
self.assertNotIn("__init__.pyc", files)
65+
else:
66+
self.assertIn("__init__.pyc", files)
67+
68+
def test_empty_package_dir(self):
6569
# See SF 1668596/1720897.
6670
cwd = os.getcwd()
6771

@@ -109,7 +113,7 @@ def test_dont_write_bytecode(self):
109113
finally:
110114
sys.dont_write_bytecode = old_dont_write_bytecode
111115

112-
self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
116+
self.assertIn('byte-compiling is disabled', self.logs[0][1])
113117

114118
def test_suite():
115119
return unittest.makeSuite(BuildPyTestCase)

0 commit comments

Comments
 (0)