Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 45e54ce..eee7c68 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2324,7 +2324,7 @@
 {
     Py_ssize_t res;
 
-    res = sizeof(PyListObject) + self->allocated * sizeof(void*);
+    res = _PyObject_SIZE(Py_TYPE(self)) + self->allocated * sizeof(void*);
     return PyLong_FromSsize_t(res);
 }