summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-04-06 17:00:14 (GMT)
committerGitHub <noreply@github.com>2022-04-06 17:00:14 (GMT)
commit884eba3c76916889fd6bff3b37b8552bfb4f9566 (patch)
tree51fd55d6170cdff327ac11d70f1e5ff1aa7e735a /Doc/whatsnew
parentf82f9ce3239b9a7e6ffa278658dd9858f64a3c14 (diff)
downloadcpython-884eba3c76916889fd6bff3b37b8552bfb4f9566.zip
cpython-884eba3c76916889fd6bff3b37b8552bfb4f9566.tar.gz
cpython-884eba3c76916889fd6bff3b37b8552bfb4f9566.tar.bz2
bpo-26579: Add object.__getstate__(). (GH-2821)
Copying and pickling instances of subclasses of builtin types bytearray, set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes implemented as slots.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.11.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 96902cf..4c9b32d 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -187,6 +187,15 @@ Other Language Changes
protocols correspondingly.
(Contributed by Serhiy Storchaka in :issue:`12022`.)
+* Added :meth:`object.__getstate__` which provides the default
+ implementation of the ``__getstate__()`` method. :mod:`Copying <copy>`
+ and :mod:`pickling <pickle>` instances of subclasses of builtin types
+ :class:`bytearray`, :class:`set`, :class:`frozenset`,
+ :class:`collections.OrderedDict`, :class:`collections.deque`,
+ :class:`weakref.WeakSet`, and :class:`datetime.tzinfo` now copies and
+ pickles instance attributes implemented as :term:`slots <__slots__>`.
+ (Contributed by Serhiy Storchaka in :issue:`26579`.)
+
Other CPython Implementation Changes
====================================