diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-10-07 09:10:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-07 09:10:15 (GMT) |
commit | ef092fe9905f61ca27889092ca1248a11aa74498 (patch) | |
tree | 8cba272926bbc17686ad23bf85f299e501b55e39 /Lib/collections | |
parent | 9e71917e0290972f65711f75510078f799cf0b59 (diff) | |
download | cpython-ef092fe9905f61ca27889092ca1248a11aa74498.zip cpython-ef092fe9905f61ca27889092ca1248a11aa74498.tar.gz cpython-ef092fe9905f61ca27889092ca1248a11aa74498.tar.bz2 |
bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596)
Diffstat (limited to 'Lib/collections')
-rw-r--r-- | Lib/collections/__init__.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 859b846..2fc71e2 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -39,21 +39,6 @@ except ImportError: pass -def __getattr__(name): - # For backwards compatibility, continue to make the collections ABCs - # through Python 3.6 available through the collections module. - # Note, no new collections ABCs were added in Python 3.7 - if name in _collections_abc.__all__: - obj = getattr(_collections_abc, name) - import warnings - warnings.warn("Using or importing the ABCs from 'collections' instead " - "of from 'collections.abc' is deprecated since Python 3.3, " - "and in 3.9 it will stop working", - DeprecationWarning, stacklevel=2) - globals()[name] = obj - return obj - raise AttributeError(f'module {__name__!r} has no attribute {name!r}') - ################################################################################ ### OrderedDict ################################################################################ |