diff --git a/CHANGES b/CHANGES index 92b6f8621..3f92b32be 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 3b1c2446e..3a2899839 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 49a54ea23..b9e9a114c 100644 --- a/six.py +++ b/six.py @@ -255,6 +255,7 @@ class _MovedItems(_LazyModule): 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"),