[New-bugs-announce] [issue20784] 'collections.abc' is no longer defined when collections is imported
R. David Murray
report at bugs.python.org
Wed Feb 26 19:25:38 CET 2014
New submission from R. David Murray:
collections.abc was renamed _collections_abc in issue 19218. The __init__ file was modified to load all the abc into the collections namespace, but the 'abc' name itself is no longer defined:
Python 3.3.2 (default, Dec 17 2013, 17:24:42)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections
>>> collections.abc
<module 'collections.abc' from '/usr/lib/python3.3/collections/abc.py'>
Python 3.4.0rc1+ (default:1bc585ba5df2, Feb 24 2014, 15:04:31)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections
>>> collections.abc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'abc'
It looks like the import statement for _collections_abc in the __init__ file as has missing "as abc" phrase.
This is probably not important enough to require fixing in the RC, since 'import collections.abc' works fine, but it is a regression.
----------
keywords: 3.4regression
messages: 212284
nosy: Arfrever, barry, christian.heimes, eric.snow, haypo, larry, pitrou, python-dev, r.david.murray, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: 'collections.abc' is no longer defined when collections is imported
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20784>
_______________________________________
More information about the New-bugs-announce
mailing list