[3.11] gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379) (#108385)

gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379)
(cherry picked from commit b6be18812c)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
Miss Islington (bot) 2023-08-23 15:10:27 -07:00 committed by GitHub
parent 34ef75d3ef
commit 869dc14a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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: