From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 17 Feb 2024 12:57:22 +0000 (+0100) Subject: [3.12] gh-56499: Update the pickle library's note section for the __setstate__ functi... X-Git-Tag: v3.12.3~264 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7218b816149a723b3c3fb024a11cfa82e1ecb283;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-56499: Update the pickle library's note section for the __setstate__ function (GH-101062) (GH-115597) (cherry picked from commit d5a30a1777f04523c7b151b894e999f5714d8e96) Co-authored-by: Furkan Onder --- diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst index c622469d5d05..b8c9787adc42 100644 --- a/Doc/library/pickle.rst +++ b/Doc/library/pickle.rst @@ -645,8 +645,8 @@ methods: .. note:: - If :meth:`__getstate__` returns a false value, the :meth:`__setstate__` - method will not be called upon unpickling. + If :meth:`__reduce__` returns a state with value ``None`` at pickling, + the :meth:`__setstate__` method will not be called upon unpickling. Refer to the section :ref:`pickle-state` for more information about how to use