[Python-Dev] Python startup time (original) (raw)

Eric Snow ericsnowcurrently at gmail.com
Thu Oct 10 20:40:42 CEST 2013


On Thu, Oct 10, 2013 at 4:18 AM, Christian Heimes <christian at 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



More information about the Python-Dev mailing list