New submission from Serhiy Storchaka:

Now abstract collection classes are defined in collections.abc rather than 
collections. collections contains just aliases for compatibility. Importing 
collections ABC from collections.abc is more idiomatic. And when aliases will 
be removed from collection this will be the only way.

But some code still imports them from collections. Proposed patch makes it 
importing them from collections.abc.

The most basic modules like locale, weakref and pathlib could import them just 
from _collections_abc for decreasing the startup time, but this is different 
issue.

The patch doesn't touch the collections module itself and its tests, and the 
_decimal module which imports collections.MutableMapping in C code (changing 
this would require more rewriting).

----------
components: Library (Lib)
messages: 292164
nosy: rhettinger, serhiy.storchaka, stutzbach
priority: normal
severity: normal
stage: patch review
status: open
title: Import collections ABC from collections.abc rather than collections
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30144>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to