Index: tests/test_gio.py
===================================================================
--- tests/test_gio.py	(revision 751)
+++ tests/test_gio.py	(working copy)
@@ -66,9 +66,8 @@
     def testReadAsync(self):
         def callback(stream, result):
             try:
-                read = stream.read_finish(result)
-                self.assertEquals(read, len("testing"))
-                self.assertEquals(result.get_buffer(), "testing")
+                data = stream.read_finish(result)
+                self.assertEquals(data, "testing")
                 stream.close()
             finally:
                 loop.quit()
@@ -82,7 +81,6 @@
         self.count = 0
         def callback(stream, result):
             try:
-                #self.assertEquals(result.get_buffer(), None)
                 self.count += 1
                 if self.count == 1:
                     return
Index: gobject/__init__.py
===================================================================
--- gobject/__init__.py	(revision 752)
+++ gobject/__init__.py	(working copy)
@@ -28,7 +28,44 @@
     pass
 
 from gobject.constants import *
-from _gobject import *
+from _gobject import \
+     GBoxed, GEnum, GError, GFlags, GInterface, GObject, GObjectWeakRef, \
+     GPointer, GType, IOChannel, Idle, MainContext, MainLoop, \
+     OptionContext, OptionGroup, Pid, PollFD, Source, Timeout, Warning, \
+     add_emission_hook, child_watch_add, features, \
+     filename_display_basename, filename_display_name, filename_from_utf8, \
+     get_application_name, get_current_time, get_prgname, \
+     glib_version, idle_add, io_add_watch, list_properties, \
+     main_context_default, main_depth, markup_escape_text, \
+     new, pygobject_version, pygtk_version, remove_emission_hook, \
+     set_application_name, set_prgname, signal_accumulator_true_handled, \
+     signal_list_ids, signal_list_names, signal_lookup, \
+     signal_name, signal_new, signal_query, source_remove, \
+     spawn_async, threads_init, timeout_add, timeout_add_seconds, \
+     type_children, type_from_name, type_interfaces, type_is_a, \
+     type_name, type_parent, type_register, \
+     IO_ERR, IO_FLAG_APPEND, IO_FLAG_GET_MASK, IO_FLAG_IS_READABLE, \
+     IO_FLAG_IS_SEEKABLE, IO_FLAG_IS_WRITEABLE, IO_FLAG_MASK, \
+     IO_FLAG_NONBLOCK, IO_FLAG_SET_MASK, IO_HUP, IO_IN, IO_NVAL, \
+     IO_OUT, IO_PRI, IO_STATUS_AGAIN, IO_STATUS_EOF, IO_STATUS_ERROR, \
+     IO_STATUS_NORMAL, \
+     OPTION_ERROR, OPTION_ERROR_BAD_VALUE, OPTION_ERROR_FAILED, \
+     OPTION_ERROR_UNKNOWN_OPTION, OPTION_FLAG_FILENAME, \
+     OPTION_FLAG_HIDDEN, OPTION_FLAG_IN_MAIN, OPTION_FLAG_NOALIAS, \
+     OPTION_FLAG_NO_ARG, OPTION_FLAG_OPTIONAL_ARG, OPTION_FLAG_REVERSE, \
+     OPTION_REMAINING, \
+     PARAM_CONSTRUCT, PARAM_CONSTRUCT_ONLY, PARAM_LAX_VALIDATION, \
+     PARAM_READABLE, PARAM_READWRITE, PARAM_WRITABLE, \
+     PRIORITY_DEFAULT, PRIORITY_DEFAULT_IDLE, PRIORITY_HIGH, \
+     PRIORITY_HIGH_IDLE, PRIORITY_LOW, \
+     SIGNAL_ACTION, SIGNAL_DETAILED, SIGNAL_NO_HOOKS, SIGNAL_NO_RECURSE, \
+     SIGNAL_RUN_CLEANUP, SIGNAL_RUN_FIRST, SIGNAL_RUN_LAST, \
+     SPAWN_CHILD_INHERITS_STDIN, SPAWN_DO_NOT_REAP_CHILD, \
+     SPAWN_FILE_AND_ARGV_ZERO, SPAWN_LEAVE_DESCRIPTORS_OPEN, \
+     SPAWN_SEARCH_PATH, SPAWN_STDERR_TO_DEV_NULL, \
+     SPAWN_STDOUT_TO_DEV_NULL, \
+     TYPE_GSTRING, TYPE_INVALID
+
 _PyGObject_API = _gobject._PyGObject_API
 
 from propertyhelper import property
@@ -95,4 +132,4 @@
         type_register(cls, namespace.get('__gtype_name__'))
 _gobject._install_metaclass(GObjectMeta)
 
-del _gobject
+del _gobjectb
Index: gobject/gobjectmodule.c
===================================================================
--- gobject/gobjectmodule.c	(revision 751)
+++ gobject/gobjectmodule.c	(working copy)
@@ -3611,6 +3611,9 @@ init_gobject(void)
         return;
     descr = PyObject_New(PyObject, &PyGPropsDescr_Type);
     PyDict_SetItemString(PyGObject_Type.tp_dict, "props", descr);
+    PyDict_SetItemString(PyGObject_Type.tp_dict, "__module__",
+			 o=PyString_FromString("gobject._gobject"));
+    Py_DECREF(o);
 
     REGISTER_GTYPE(d, PyGInterface_Type, "GInterface", G_TYPE_INTERFACE);
     PyDict_SetItemString(PyGInterface_Type.tp_dict, "__doc__",
Index: gio/ginputstream.override
===================================================================
--- gio/ginputstream.override	(revision 751)
+++ gio/ginputstream.override	(working copy)
@@ -19,6 +19,64 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  * USA
  */
+#define BUFSIZE 8192
+
+typedef struct {
+    PyObject *callback;
+    PyObject *data;
+    PyObject *buffer;
+} PyGAsyncRequestNotifyRead;
+
+static void
+py_decref_callback (gpointer data)
+{
+    Py_DECREF((PyObject*)data);
+}
+
+static void
+async_result_callback_marshal_read(GObject *source_object, 
+				   GAsyncResult *result, 
+				   PyGAsyncRequestNotifyRead *notify)
+{
+    PyObject *ret;
+    PyGILState_STATE state;
+    static GQuark quark = 0;
+    
+    state = pyg_gil_state_ensure();
+
+    /* buffer is only used by read_async */
+    if (notify->buffer) {
+	if (!quark)
+	    quark = g_quark_from_string("pygio::buffer");
+	Py_XINCREF(notify->buffer);
+	g_object_set_qdata_full(G_OBJECT(result), quark,
+				notify->buffer, py_decref_callback);
+    }
+    
+    if (notify->data)
+	ret = PyEval_CallFunction(notify->callback, "(OOO)", 
+				  pygobject_new(source_object), 
+				  pygobject_new((GObject *)result),
+				  notify->data);
+    else
+	ret = PyObject_CallFunction(notify->callback, "(OO)", 
+				    pygobject_new(source_object), 
+				    pygobject_new((GObject *)result));
+
+    if (ret == NULL)
+      {
+	PyErr_Print();
+	PyErr_Clear();
+      }
+
+    Py_XDECREF(ret);
+
+    Py_DECREF(notify->callback);
+    Py_XDECREF(notify->data);
+    g_slice_free(PyGAsyncRequestNotifyRead, notify);
+
+    pyg_gil_state_release(state);
+}
 %%
 override g_input_stream_read kwargs
 static PyObject *
@@ -103,9 +161,9 @@
   GCancellable *cancellable;
 
 
-  PyGAsyncRequestNotify *notify;
+  PyGAsyncRequestNotifyRead *notify;
   
-  notify = g_slice_new0(PyGAsyncRequestNotify);
+  notify = g_slice_new0(PyGAsyncRequestNotifyRead);
 
   if (!PyArg_ParseTupleAndKeywords(args, kwargs,
 				   "liOO|O:InputStream.read_async",
@@ -115,7 +173,7 @@
 				   &notify->callback,
 				   &notify->data))
     {
-      g_slice_free(PyGAsyncRequestNotify, notify);
+      g_slice_free(PyGAsyncRequestNotifyRead, notify);
       return NULL;
     }
 
@@ -132,7 +190,7 @@
   if (!PyCallable_Check(notify->callback))
     {
       PyErr_SetString(PyExc_TypeError, "callback argument not callable");
-      g_slice_free(PyGAsyncRequestNotify, notify);
+      g_slice_free(PyGAsyncRequestNotifyRead, notify);
       return NULL;
     }
   Py_INCREF(notify->callback);
@@ -147,9 +205,38 @@
 			    count,
 			    io_priority,
 			    cancellable,
-			    (GAsyncReadyCallback)async_result_callback_marshal,
+			    (GAsyncReadyCallback)async_result_callback_marshal_read,
 			    notify);
   
   Py_INCREF(Py_None);
   return Py_None;
 }
+%%
+override g_input_stream_read_finish kwargs
+static PyObject *
+_wrap_g_input_stream_read_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GError *error = NULL;
+    static GQuark quark = 0;
+    PyObject *buffer;
+    
+    if (!quark)
+	quark = g_quark_from_string("pygio::buffer");
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+				     "O!:GInputStream.read_finish",
+				     kwlist, &PyGAsyncResult_Type, &result))
+        return NULL;
+    
+
+    g_input_stream_read_finish(G_INPUT_STREAM(self->obj), G_ASYNC_RESULT(result->obj), &error);
+    
+    if (pyg_error_check(&error))
+        return NULL;
+
+    buffer = g_object_get_qdata(G_OBJECT(result->obj), quark);
+    /* FIXME: Should we refcount the buffer here? */
+    return buffer;
+}
Index: gio/gio.override
===================================================================
--- gio/gio.override	(revision 751)
+++ gio/gio.override	(working copy)
@@ -53,13 +53,16 @@
     static GQuark quark = 0;
     
     state = pyg_gil_state_ensure();
-    
-    if (!quark)
-	quark = g_quark_from_string("pygio::buffer");
-    Py_XINCREF(notify->buffer);
-    g_object_set_qdata_full(G_OBJECT(result), quark,
-			    notify->buffer, py_decref_callback);
 
+    /* buffer is only used by read_async */
+    if (notify->buffer) {
+	if (!quark)
+	    quark = g_quark_from_string("pygio::buffer");
+	Py_XINCREF(notify->buffer);
+	g_object_set_qdata_full(G_OBJECT(result), quark,
+				notify->buffer, py_decref_callback);
+    }
+    
     if (notify->data)
 	ret = PyEval_CallFunction(notify->callback, "(OOO)", 
 				  pygobject_new(source_object), 
@@ -161,19 +164,3 @@
   
   return ret;
 }
-%%
-define GSimpleAsyncResult.get_buffer noargs 
-static PyObject *
-_wrap_g_simple_async_result_get_buffer(PyGObject *self)
-{
-    static GQuark quark = 0;
-    PyObject *buffer;
-
-    if (!quark)
-	quark = g_quark_from_string("pygio::buffer");
-
-    buffer = g_object_get_qdata(G_OBJECT(self->obj), quark);
-
-    Py_INCREF(buffer);
-    return buffer;
-}
