celery/celery — pull request #1287 by aaronharnly (2013-04-04 10:51:35+00:00)
Title: ConfigurationView (hence Settings) is a MutableMapping

The celery.datastructures.ConfigurationView acts like a dictionary, so it should register itself as such with the MutableMapping abstract base class. This is useful for code which detects dict-like things.

(Many of the collections abstract base classes, such as Iterable, implement subclasshook to define themselves via duck-typing, checking for implemented methods. Unfortunately Mapping and MutableMapping do not do this, so it is necessary to explicitly register.)

Includes an implementation of len, to complete the interface, and unit tests.