On Thu, Oct 10, 2013 at 4:18 AM, Christian Heimes <christ...@python.org> wrote: > We don't have to use a custom module type to get rid of these imports > (but I like to get my hands a piece of chocolate cake *g*). We can > either implement yet another mutable mapping class for the os module. > That would remove the dependency on collections.abc. > > Or we have to juggle the modules a bit so we can get to MutableMapping > without the extra stuff from collections.__init__. The abc and > _weakset modules are already loaded by the io module. Only > collections.__init__ imports _collections, operator, keyword, heapq, > itertools and reprlib.
I've created a ticket for the os/collections issue: http://bugs.python.org/issue19218. I also put a patch on there that takes a metaclass approach. It removes the need to fiddle with the collections package or to implement the other MutableMapping methods (along with the view classes) on _Environ. -eric _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com