]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 23 Aug 2023 22:10:27 +0000 (15:10 -0700)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 22:10:27 +0000 (22:10 +0000)
gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379)
(cherry picked from commit b6be18812c68fce5ab56c266dc5fc5a3cceb09c0)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Doc/whatsnew/3.11.rst

index 5de165a566547acc28e20b9954ef9de72139cf34..af7162128ebbc299510c95d9ed5f627a377a87f7 100644 (file)
@@ -459,6 +459,10 @@ Other Language Changes
   :class:`collections.OrderedDict`, :class:`collections.deque`,
   :class:`weakref.WeakSet`, and :class:`datetime.tzinfo` now copies and
   pickles instance attributes implemented as :term:`slots <__slots__>`.
+  This change has an unintended side effect: It trips up a small minority
+  of existing Python projects not expecting :meth:`object.__getstate__` to
+  exist. See the later comments on :gh:`70766` for discussions of what
+  workarounds such code may need.
   (Contributed by Serhiy Storchaka in :issue:`26579`.)
 
 .. _whatsnew311-pythonsafepath: