Index: tests/test_gio.py
===================================================================
--- tests/test_gio.py	(revision 934)
+++ tests/test_gio.py	(working copy)
@@ -373,7 +373,17 @@
                                               10, gio.FILE_QUERY_INFO_NONE)
                 self.assertEqual(ret, True)
 
+    def test_eq(self):
+        self.assertEqual(gio.File('foo'),
+                         gio.File('foo'))
+        self.assertNotEqual(gio.File('foo'),
+                            gio.File('bar'))
 
+    def test_hash(self):
+        self.assertEquals(hash(gio.File('foo')),
+                          hash(gio.File('foo')))
+
+
 class TestGFileEnumerator(unittest.TestCase):
     def setUp(self):
         self.file = gio.File(".")
Index: gio/gfile.override
===================================================================
--- gio/gfile.override	(revision 934)
+++ gio/gfile.override	(working copy)
@@ -983,3 +983,61 @@
 /* GFile.load_partial_contents_finish: No ArgType for char** */
 /* GFile.replace_contents: No ArgType for char** */
 /* GFile.replace_contents_finish: No ArgType for char** */
+%%
+override-slot GFile.tp_richcompare
+static PyObject *
+_wrap_g_file_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+    PyObject *result;
+
+    if (PyObject_TypeCheck(self, &PyGFile_Type)
+        && PyObject_TypeCheck(other, &PyGFile_Type)) {
+        GFile *file1 = G_FILE(self->obj);
+        GFile *file2 = G_FILE(other->obj);
+
+        switch (op) {
+        case Py_EQ:
+            result = (g_file_equal(file1, file2)
+                      ? Py_True : Py_False);
+            break;
+        case Py_NE:
+            result = (!g_file_equal(file1, file2)
+                      ? Py_True : Py_False);
+            break;
+        default:
+            result = Py_NotImplemented;
+        }
+    }
+    else
+        result = Py_NotImplemented;
+
+    Py_INCREF(result);
+    return result;
+}
+%%
+override-slot GFile.tp_hash
+static long
+_wrap_g_file_tp_hash(PyGObject *self)
+{
+    return g_file_hash(G_FILE(self->obj));
+}
+%%
+override-slot GFile.tp_repr
+static PyObject *
+_wrap_g_file_tp_repr(PyGObject *self)
+{
+    char *uri = g_file_get_uri(G_FILE(self->obj));
+    gchar *representation;
+    PyObject *result;
+
+    if (uri) {
+	representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+	g_free(uri);
+    }
+    else
+	representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
