bpo-25988: Deprecate exposing collections.abc in collections GH-5414 · python/cpython@e6d3421

Original file line numberDiff line numberDiff line change

@@ -18,10 +18,14 @@

1818

'UserString', 'Counter', 'OrderedDict', 'ChainMap']

1919
2020

# For backwards compatibility, continue to make the collections ABCs

21-

# available through the collections module.

22-

from _collections_abc import *

21+

# through Python 3.6 available through the collections module.

22+

# Note, no new collections ABCs were added in Python 3.7

2323

import _collections_abc

24-

__all__ += _collections_abc.__all__

24+

from _collections_abc import (AsyncGenerator, AsyncIterable, AsyncIterator,

25+

Awaitable, ByteString, Callable, Collection, Container, Coroutine,

26+

Generator, Hashable, ItemsView, Iterable, Iterator, KeysView, Mapping,

27+

MappingView, MutableMapping, MutableSequence, MutableSet, Reversible,

28+

Sequence, Set, Sized, ValuesView)

2529
2630

from operator import itemgetter as _itemgetter, eq as _eq

2731

from keyword import iskeyword as _iskeyword