Make __module__ writable except in restricted mode (like for classic classes).
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 5e967d3..3a92fa4 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -189,7 +189,7 @@
 #define OFF(x) offsetof(PyCFunctionObject, x)
 
 static PyMemberDef meth_members[] = {
-	{"__module__",    T_OBJECT,     OFF(m_module)},
+	{"__module__",    T_OBJECT,     OFF(m_module), WRITE_RESTRICTED},
 	{NULL}
 };