Merge upstream default into issue_19

--HG--
branch : issue_19
diff --git a/six.py b/six.py
index 3887a06..9a8a9a3 100644
--- a/six.py
+++ b/six.py
@@ -104,6 +104,10 @@
     def _resolve(self):
         return _import_module(self.mod)
 
+    def __getattr__(self, attr):
+        _module = self._resolve()
+        return getattr(_module, attr)
+
 
 class _LazyModule(types.ModuleType):
 
@@ -212,6 +216,8 @@
 ]
 for attr in _moved_attributes:
     setattr(_MovedItems, attr.name, attr)
+    if isinstance(attr, MovedModule):
+        sys.modules[__name__ + ".moves." + attr.name] = attr
 del attr
 
 _MovedItems._moved_attributes = _moved_attributes
diff --git a/test_six.py b/test_six.py
index e6e75dd..14f0e7e 100644
--- a/test_six.py
+++ b/test_six.py
@@ -96,7 +96,9 @@
 def test_move_items(item_name):
     """Ensure that everything loads correctly."""
     try:
-        getattr(six.moves, item_name)
+        item = getattr(six.moves, item_name)
+        if isinstance(item, types.ModuleType):
+            __import__("six.moves." + item_name)
     except AttributeError:
         if item_name == "zip_longest" and sys.version_info < (2, 6):
             py.test.skip("zip_longest only available on 2.6+")
@@ -183,6 +185,16 @@
     from six.moves.urllib_parse import urljoin
 
 
+def test_from_six_moves_queue_import_Queue():
+    from six.moves.queue import Queue
+    assert isinstance(Queue, types.ClassType)
+
+
+def test_from_six_moves_configparser_import_ConfigParser():
+    from six.moves.configparser import ConfigParser
+    assert isinstance(ConfigParser, types.ClassType)
+
+
 def test_filter():
     from six.moves import filter
     f = filter(lambda x: x % 2, range(10))