summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-04-24 06:05:00 (GMT)
committerGitHub <noreply@github.com>2017-04-24 06:05:00 (GMT)
commit2e576f5aec1f8f23f07001e2eb3db9276851a4fc (patch)
tree0c42af143f2ab71bce5865aa72056330fcc510db /Doc
parent9eb5ca0774f94215be48442100c829db2484e146 (diff)
downloadcpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.zip
cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.tar.gz
cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.tar.bz2
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/http.client.rst2
-rw-r--r--Doc/reference/datamodel.rst6
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst
index 2f59ece..53de40f 100644
--- a/Doc/library/http.client.rst
+++ b/Doc/library/http.client.rst
@@ -372,7 +372,7 @@ also send your request step by step, by using the four functions below.
Section 3.3.1. How the data is encoded is dependent on the type of
*message_body*. If *message_body* implements the :ref:`buffer interface
<bufferobjects>` the encoding will result in a single chunk.
- If *message_body* is a :class:`collections.Iterable`, each iteration
+ If *message_body* is a :class:`collections.abc.Iterable`, each iteration
of *message_body* will result in a chunk. If *message_body* is a
:term:`file object`, each call to ``.read()`` will result in a chunk.
The method automatically signals the end of the chunk-encoded data
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 35925a0..058fa90 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1375,7 +1375,7 @@ Basic customization
:meth:`__hash__` method of a class is ``None``, instances of the class will
raise an appropriate :exc:`TypeError` when a program attempts to retrieve
their hash value, and will also be correctly identified as unhashable when
- checking ``isinstance(obj, collections.Hashable)``.
+ checking ``isinstance(obj, collections.abc.Hashable)``.
If a class that overrides :meth:`__eq__` needs to retain the implementation
of :meth:`__hash__` from a parent class, the interpreter must be told this
@@ -1385,7 +1385,7 @@ Basic customization
support, it should include ``__hash__ = None`` in the class definition.
A class which defines its own :meth:`__hash__` that explicitly raises
a :exc:`TypeError` would be incorrectly identified as hashable by
- an ``isinstance(obj, collections.Hashable)`` call.
+ an ``isinstance(obj, collections.abc.Hashable)`` call.
.. note::
@@ -1981,7 +1981,7 @@ range of items. It is also recommended that mappings provide the methods
:meth:`keys`, :meth:`values`, :meth:`items`, :meth:`get`, :meth:`clear`,
:meth:`setdefault`, :meth:`pop`, :meth:`popitem`, :meth:`!copy`, and
:meth:`update` behaving similar to those for Python's standard dictionary
-objects. The :mod:`collections` module provides a
+objects. The :mod:`collections.abc` module provides a
:class:`~collections.abc.MutableMapping`
abstract base class to help create those methods from a base set of
:meth:`__getitem__`, :meth:`__setitem__`, :meth:`__delitem__`, and :meth:`keys`.