#3247 Get rid of Py_FindMethod; use tp_members instead.
Otherwise dir(_sre.SRE_Match) returns an empty list.

First step: handle most occurrences, remove tp_getattr and fill the tp_methods and tp_members slots.
Add some test about attribute access.
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index f1c71e4..daabf03 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -625,12 +625,6 @@
   	PyObject_Del(self);
 }
 
-static PyObject *
-poll_getattr(pollObject *self, char *name)
-{
-	return Py_FindMethod(poll_methods, (PyObject *)self, name);
-}
-
 static PyTypeObject poll_Type = {
 	/* The ob_type field must be initialized in the module init function
 	 * to be portable to Windows without using C++. */
@@ -641,7 +635,7 @@
 	/* methods */
 	(destructor)poll_dealloc, /*tp_dealloc*/
 	0,			/*tp_print*/
-	(getattrfunc)poll_getattr, /*tp_getattr*/
+	0,			/*tp_getattr*/
 	0,                      /*tp_setattr*/
 	0,			/*tp_compare*/
 	0,			/*tp_repr*/
@@ -649,6 +643,20 @@
 	0,			/*tp_as_sequence*/
 	0,			/*tp_as_mapping*/
 	0,			/*tp_hash*/
+	0,			/*tp_call*/
+	0,			/*tp_str*/
+	0,			/*tp_getattro*/
+	0,			/*tp_setattro*/
+	0,			/*tp_as_buffer*/
+	Py_TPFLAGS_DEFAULT,	/*tp_flags*/
+	0,			/*tp_doc*/
+	0,			/*tp_traverse*/
+	0,			/*tp_clear*/
+	0,			/*tp_richcompare*/
+	0,			/*tp_weaklistoffset*/
+	0,			/*tp_iter*/
+	0,			/*tp_iternext*/
+	poll_methods,		/*tp_methods*/
 };
 
 PyDoc_STRVAR(poll_doc,
@@ -1764,7 +1772,8 @@
 #else
 	{
 #endif
-		Py_TYPE(&poll_Type) = &PyType_Type;
+		if (PyType_Ready(&poll_Type) < 0)
+			return NULL;
 		PyModule_AddIntConstant(m, "POLLIN", POLLIN);
 		PyModule_AddIntConstant(m, "POLLPRI", POLLPRI);
 		PyModule_AddIntConstant(m, "POLLOUT", POLLOUT);