This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
Core and Builtins
-----------------
+ - 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.
+
- Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.
+- Issue #5319: New Py_FinalizeEx() API allowing Python to set an exit status
+ of 120 on failure to flush buffered streams.
+
+- Issue #25485: telnetlib.Telnet is now a context manager.
+
- Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
__getattr__.
Py_ssize_t res;
Py_ssize_t blocks;
- res = sizeof(dequeobject);
+ res = _PyObject_SIZE(Py_TYPE(deque));
- blocks = (deque->leftindex + Py_SIZE(deque) + BLOCKLEN - 1) / BLOCKLEN;
+ blocks = (size_t)(deque->leftindex + Py_SIZE(deque) + BLOCKLEN - 1) / BLOCKLEN;
assert(deque->leftindex + Py_SIZE(deque) - 1 ==
(blocks - 1) * BLOCKLEN + deque->rightindex);
res += blocks * sizeof(block);