summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2019-11-04 20:30:58 -0800
committerBenjamin Peterson <benjamin@python.org>2019-11-04 23:11:58 -0800
commit0dc54ead62c7fb06edabf1ff22fb71c0c6d958e1 (patch)
treec0574cfe9f9e60184adfd8da7850e06455d9f22e
parent1f2f571cc7b3a3f57bdde604ce7b748f376adbe3 (diff)
downloadsix-git-0dc54ead62c7fb06edabf1ff22fb71c0c6d958e1.tar.gz
Add six.moves.collections_abc.
Fixes #155. Closes #241.
-rw-r--r--CHANGES3
-rw-r--r--documentation/index.rst2
-rw-r--r--six.py1
3 files changed, 6 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 92b6f86..3f92b32 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@ This file lists the changes in each six version.
1.13.0
------
+- Issue #155: Add `six.moves.collections_abc`, which aliases the `collections`
+ module on Python 2-3.2 and the `collections.abc` on Python 3.3 and greater.
+
- Pull request #304: Re-add distutils fallback in `setup.py`.
- Pull request #305: On Python 3.7, `with_metaclass` supports classes using PEP
diff --git a/documentation/index.rst b/documentation/index.rst
index 3b1c244..3a28998 100644
--- a/documentation/index.rst
+++ b/documentation/index.rst
@@ -584,6 +584,8 @@ Supported renames:
+------------------------------+-------------------------------------+---------------------------------------+
| ``cStringIO`` | :func:`py2:cStringIO.StringIO` | :class:`py3:io.StringIO` |
+------------------------------+-------------------------------------+---------------------------------------+
+| ``collections_abc`` | :mod:`py2:collections` | :mod:`py3:collections.abc` (3.3+) |
++------------------------------+-------------------------------------+---------------------------------------+
| ``dbm_gnu`` | :func:`py2:gdbm` | :class:`py3:dbm.gnu` |
+------------------------------+-------------------------------------+---------------------------------------+
| ``dbm_ndbm`` | :func:`py2:dbm` | :func:`py3:dbm.ndbm` |
diff --git a/six.py b/six.py
index 49a54ea..b9e9a11 100644
--- a/six.py
+++ b/six.py
@@ -255,6 +255,7 @@ _moved_attributes = [
MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
MovedModule("builtins", "__builtin__"),
MovedModule("configparser", "ConfigParser"),
+ MovedModule("collections_abc", "collections", "collections.abc" if sys.version_info >= (3, 3) else "collections"),
MovedModule("copyreg", "copy_reg"),
MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),