Skip to content

Commit

Permalink
Merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
larryhastings committed Jun 27, 2016
2 parents 9bb2005 + 1e957d1 commit 1b329e7
Show file tree
Hide file tree
Showing 110 changed files with 1,523 additions and 794 deletions.
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ ab2c023a9432f16652e89c404bbc84aa91bf55af v3.4.2
b4cbecbc0781e89a309d03b60a1f75f8499250e6 v3.4.3
04f3f725896c6961212c3a12e8ac25be6958f4fa v3.4.4rc1
737efcadf5a678b184e0fa431aae11276bf06648 v3.4.4
3631bb4a2490292ebf81d3e947ae36da145da564 v3.4.5rc1
5d4b6a57d5fd7564bf73f3db0e46fe5eeb00bcd8 v3.5.0a1
0337bd7ebcb6559d69679bc7025059ad1ce4f432 v3.5.0a2
82656e28b5e5c4ae48d8dd8b5f0d7968908a82b6 v3.5.0a3
Expand Down
9 changes: 8 additions & 1 deletion Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ autobuild-dev:
-make suspicious

# for quick rebuilds (HTML only)
autobuild-html:
autobuild-dev-html:
make html SPHINXOPTS='-A daily=1 -A versionswitcher=1'

# for stable releases: only build if not in pre-release stage (alpha, beta)
Expand All @@ -177,3 +177,10 @@ autobuild-stable:
exit 1;; \
esac
@make autobuild-dev

autobuild-stable-html:
@case $(DISTVERSION) in *[ab]*) \
echo "Not building; $(DISTVERSION) is not a release version."; \
exit 1;; \
esac
@make autobuild-dev-html
4 changes: 2 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Module Objects
.. index:: single: __dict__ (module attribute)
Return the dictionary object that implements *module*'s namespace; this object
is the same as the :attr:`__dict__` attribute of the module object. This
is the same as the :attr:`~object.__dict__` attribute of the module object. This
function never fails. It is recommended extensions use other
:c:func:`PyModule_\*` and :c:func:`PyObject_\*` functions rather than directly
manipulate a module's :attr:`__dict__`.
manipulate a module's :attr:`~object.__dict__`.
.. c:function:: PyObject* PyModule_GetNameObject(PyObject *module)
Expand Down
5 changes: 2 additions & 3 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ specific C type of the *self* object.
The :attr:`ml_flags` field is a bitfield which can include the following flags.
The individual flags indicate either a calling convention or a binding
convention. Of the calling convention flags, only :const:`METH_VARARGS` and
:const:`METH_KEYWORDS` can be combined (but note that :const:`METH_KEYWORDS`
alone is equivalent to ``METH_VARARGS | METH_KEYWORDS``). Any of the calling
convention flags can be combined with a binding flag.
:const:`METH_KEYWORDS` can be combined. Any of the calling convention flags
can be combined with a binding flag.


.. data:: METH_VARARGS
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ type objects) *must* have the :attr:`ob_size` field.
For statically allocated type objects, the tp_name field should contain a dot.
Everything before the last dot is made accessible as the :attr:`__module__`
attribute, and everything after the last dot is made accessible as the
:attr:`__name__` attribute.
:attr:`~definition.__name__` attribute.

If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the
:attr:`__name__` attribute, and the :attr:`__module__` attribute is undefined
:attr:`~definition.__name__` attribute, and the :attr:`__module__` attribute is undefined
(unless explicitly set in the dictionary, as explained above). This means your
type will be impossible to pickle.

Expand Down
2 changes: 1 addition & 1 deletion Doc/faq/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ remember the methods for a list, they can do something like this::
>>> L
[1]

With the interpreter, documentation is never far from the student as he's
With the interpreter, documentation is never far from the student as they are
programming.

There are also good IDEs for Python. IDLE is a cross-platform IDE for Python
Expand Down
4 changes: 1 addition & 3 deletions Doc/howto/regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,7 @@ module. If you have :mod:`tkinter` available, you may also want to look at
:source:`Tools/demo/redemo.py`, a demonstration program included with the
Python distribution. It allows you to enter REs and strings, and displays
whether the RE matches or fails. :file:`redemo.py` can be quite useful when
trying to debug a complicated RE. Phil Schwartz's `Kodos
<http://kodos.sourceforge.net/>`_ is also an interactive tool for developing and
testing RE patterns.
trying to debug a complicated RE.

This HOWTO uses the standard Python interpreter for its examples. First, run the
Python interpreter, import the :mod:`re` module, and compile a RE::
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/builtins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ that wants to implement an :func:`open` function that wraps the built-in

As an implementation detail, most modules have the name ``__builtins__`` made
available as part of their globals. The value of ``__builtins__`` is normally
either this module or the value of this module's :attr:`__dict__` attribute.
either this module or the value of this module's :attr:`~object.__dict__` attribute.
Since this is an implementation detail, it may not be used by alternate
implementations of Python.
4 changes: 2 additions & 2 deletions Doc/library/curses.ascii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ C library:

.. function:: isblank(c)

Checks for an ASCII whitespace character.
Checks for an ASCII whitespace character; space or horizontal tab.


.. function:: iscntrl(c)

Checks for an ASCII control character (in the range 0x00 to 0x1f).
Checks for an ASCII control character (in the range 0x00 to 0x1f or 0x7f).


.. function:: isdigit(c)
Expand Down
10 changes: 10 additions & 0 deletions Doc/library/dbm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ The individual submodules are described in the following sections.
:platform: Unix
:synopsis: GNU's reinterpretation of dbm.

**Source code:** :source:`Lib/dbm/gnu.py`

--------------

This module is quite similar to the :mod:`dbm` module, but uses the GNU library
``gdbm`` instead to provide some additional functionality. Please note that the
Expand Down Expand Up @@ -237,6 +240,9 @@ supported.
:platform: Unix
:synopsis: The standard "database" interface, based on ndbm.

**Source code:** :source:`Lib/dbm/ndbm.py`

--------------

The :mod:`dbm.ndbm` module provides an interface to the Unix "(n)dbm" library.
Dbm objects behave like mappings (dictionaries), except that keys and values are
Expand Down Expand Up @@ -299,6 +305,8 @@ to locate the appropriate header file to simplify building this module.
.. module:: dbm.dumb
:synopsis: Portable implementation of the simple DBM interface.

**Source code:** :source:`Lib/dbm/dumb.py`

.. index:: single: databases

.. note::
Expand All @@ -308,6 +316,8 @@ to locate the appropriate header file to simplify building this module.
module is not written for speed and is not nearly as heavily used as the other
database modules.

--------------

The :mod:`dbm.dumb` module provides a persistent dictionary-like interface which
is written entirely in Python. Unlike other modules such as :mod:`dbm.gnu` no
external library is required. As with other persistent mappings, the keys and
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ The solution is to specify the module name explicitly as follows::
the source, pickling will be disabled.

The new pickle protocol 4 also, in some circumstances, relies on
:attr:`__qualname__` being set to the location where pickle will be able
:attr:`~definition.__qualname__` being set to the location where pickle will be able
to find the class. For example, if the class was made available in class
SomeData in the global scope::

Expand Down
12 changes: 6 additions & 6 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ are always available. They are listed here in alphabetical order.
:func:`dir` reports their attributes.

If the object does not provide :meth:`__dir__`, the function tries its best to
gather information from the object's :attr:`__dict__` attribute, if defined, and
gather information from the object's :attr:`~object.__dict__` attribute, if defined, and
from its type object. The resulting list is not necessarily complete, and may
be inaccurate when the object has a custom :func:`__getattr__`.

Expand Down Expand Up @@ -1446,7 +1446,7 @@ are always available. They are listed here in alphabetical order.

With three arguments, return a new type object. This is essentially a
dynamic form of the :keyword:`class` statement. The *name* string is the
class name and becomes the :attr:`~class.__name__` attribute; the *bases*
class name and becomes the :attr:`~definition.__name__` attribute; the *bases*
tuple itemizes the base classes and becomes the :attr:`~class.__bases__`
attribute; and the *dict* dictionary is the namespace containing definitions
for class body and is copied to a standard dictionary to become the
Expand All @@ -1464,12 +1464,12 @@ are always available. They are listed here in alphabetical order.
.. function:: vars([object])

Return the :attr:`~object.__dict__` attribute for a module, class, instance,
or any other object with a :attr:`__dict__` attribute.
or any other object with a :attr:`~object.__dict__` attribute.

Objects such as modules and instances have an updateable :attr:`__dict__`
Objects such as modules and instances have an updateable :attr:`~object.__dict__`
attribute; however, other objects may have write restrictions on their
:attr:`__dict__` attributes (for example, classes use a
dictproxy to prevent direct dictionary updates).
:attr:`~object.__dict__` attributes (for example, classes use a
:class:`types.MappingProxyType` to prevent direct dictionary updates).

Without an argument, :func:`vars` acts like :func:`locals`. Note, the
locals dictionary is only useful for reads since updates to the locals
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/functools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ have three read-only attributes:

:class:`partial` objects are like :class:`function` objects in that they are
callable, weak referencable, and can have attributes. There are some important
differences. For instance, the :attr:`__name__` and :attr:`__doc__` attributes
differences. For instance, the :attr:`~definition.__name__` and :attr:`__doc__` attributes
are not created automatically. Also, :class:`partial` objects defined in
classes behave like static methods and do not transform into bound methods
during instance attribute look-up.
14 changes: 14 additions & 0 deletions Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ Functions
.. module:: importlib.abc
:synopsis: Abstract base classes related to import

**Source code:** :source:`Lib/importlib/abc.py`

--------------


The :mod:`importlib.abc` module contains all of the core abstract base classes
used by :keyword:`import`. Some subclasses of the core abstract base classes
are also provided to help in implementing the core ABCs.
Expand Down Expand Up @@ -700,6 +705,10 @@ ABC hierarchy::
.. module:: importlib.machinery
:synopsis: Importers and path hooks

**Source code:** :source:`Lib/importlib/machinery.py`

--------------

This module contains the various objects that help :keyword:`import`
find and load modules.

Expand Down Expand Up @@ -1082,6 +1091,11 @@ find and load modules.
.. module:: importlib.util
:synopsis: Utility code for importers


**Source code:** :source:`Lib/importlib/util.py`

--------------

This module contains the various objects that help in the construction of
an :term:`importer`.

Expand Down
9 changes: 5 additions & 4 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@ attributes:
are true.

This, for example, is true of ``int.__add__``. An object passing this test
has a :attr:`__get__` attribute but not a :attr:`__set__` attribute, but
beyond that the set of attributes varies. :attr:`__name__` is usually
has a :meth:`~object.__get__` method but not a :meth:`~object.__set__`
method, but beyond that the set of attributes varies. A
:attr:`~definition.__name__` attribute is usually
sensible, and :attr:`__doc__` often is.

Methods implemented via descriptors that also pass one of the other tests
Expand All @@ -388,11 +389,11 @@ attributes:

Return true if the object is a data descriptor.

Data descriptors have both a :attr:`__get__` and a :attr:`__set__` attribute.
Data descriptors have both a :attr:`~object.__get__` and a :attr:`~object.__set__` method.
Examples are properties (defined in Python), getsets, and members. The
latter two are defined in C and there are more specific tests available for
those types, which is robust across Python implementations. Typically, data
descriptors will also have :attr:`__name__` and :attr:`__doc__` attributes
descriptors will also have :attr:`~definition.__name__` and :attr:`__doc__` attributes
(properties, getsets, and members have both of these attributes), but this is
not guaranteed.

Expand Down
8 changes: 7 additions & 1 deletion Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,19 @@ when serializing instances of "exotic" numerical types such as
:class:`decimal.Decimal`.

.. highlight:: bash
.. module:: json.tool

.. _json-commandline:

Command Line Interface
----------------------

.. module:: json.tool
:synopsis: A command line to validate and pretty-print JSON.

**Source code:** :source:`Lib/json/tool.py`

--------------

The :mod:`json.tool` module provides a simple command line interface to validate
and pretty-print JSON objects.

Expand Down
9 changes: 2 additions & 7 deletions Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ Connection objects are usually created using :func:`Pipe` -- see also
using :meth:`recv`.

The object must be picklable. Very large pickles (approximately 32 MB+,
though it depends on the OS) may raise a ValueError exception.
though it depends on the OS) may raise a :exc:`ValueError` exception.

.. method:: recv()

Expand Down Expand Up @@ -2723,12 +2723,7 @@ start method.

More picklability

Ensure that all arguments to :meth:`Process.__init__` are
picklable. This means, in particular, that bound or unbound
methods cannot be used directly as the ``target`` (unless you use
the *fork* start method) --- just define a function and use that
instead.

Ensure that all arguments to :meth:`Process.__init__` are picklable.
Also, if you subclass :class:`~multiprocessing.Process` then make sure that
instances will be picklable when the :meth:`Process.start
<multiprocessing.Process.start>` method is called.
Expand Down
11 changes: 7 additions & 4 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,11 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
.. function:: writev(fd, buffers)

Write the contents of *buffers* to file descriptor *fd*. *buffers* must be a
sequence of :term:`bytes-like objects <bytes-like object>`.
sequence of :term:`bytes-like objects <bytes-like object>`. Buffers are
processed in array order. Entire contents of first buffer is written before
proceeding to second, and so on. The operating system may set a limit
(sysconf() value SC_IOV_MAX) on the number of buffers that can be used.

:func:`~os.writev` writes the contents of each object to the file descriptor
and returns the total number of bytes written.

Expand Down Expand Up @@ -2049,9 +2053,8 @@ features:

Note that there is a nice correspondence between several attributes
and methods of ``DirEntry`` and of :class:`pathlib.Path`. In
particular, the ``name`` and ``path`` attributes have the same
meaning, as do the ``is_dir()``, ``is_file()``, ``is_symlink()``
and ``stat()`` methods.
particular, the ``name`` attribute has the same meaning, as do the
``is_dir()``, ``is_file()``, ``is_symlink()`` and ``stat()`` methods.

.. versionadded:: 3.5

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ three digits in length.
The ``'\u'`` and ``'\U'`` escape sequences have been added.

.. deprecated-removed:: 3.5 3.6
Unknown escapes consist of ``'\'`` and ASCII letter now raise a
Unknown escapes consisting of ``'\'`` and ASCII letter now raise a
deprecation warning and will be forbidden in Python 3.6.


Expand Down
7 changes: 5 additions & 2 deletions Doc/library/readline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ The following functions operate on a history file:

Append the last *nelements* items of history to a file. The default filename is
:file:`~/.history`. The file must already exist. This calls
:c:func:`append_history` in the underlying library.
:c:func:`append_history` in the underlying library. This function
only exists if Python was compiled for a version of the library
that supports it.

.. versionadded:: 3.5

Expand Down Expand Up @@ -185,7 +187,8 @@ Startup hooks
be used as the new hook function; if omitted or ``None``, any
function already installed is removed. The hook is called
with no arguments after the first prompt has been printed and just before
readline starts reading input characters.
readline starts reading input characters. This function only exists
if Python was compiled for a version of the library that supports it.


Completion
Expand Down
Loading

0 comments on commit 1b329e7

Please sign in to comment.