From 8b20bedaf564c5aabdf040b40d0de2ccd9a75060 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Thu, 11 Jun 2026 17:02:38 +0200 Subject: [PATCH] [3.13] gh-150285: Suppress showing the __getstate__() comment in the help for dataclasses (GH-151328) (GH-151333) (cherry picked from commit 0066fd73a20950dc790d219f4e3cfb07e816df47) Co-authored-by: Serhiy Storchaka --- Lib/dataclasses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index 8703e0763892..9301ba2d9623 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -1186,6 +1186,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen, # classes with slots. These could be slightly more performant if we generated # the code instead of iterating over fields. But that can be a project for # another day, if performance becomes an issue. + def _dataclass_getstate(self): return [getattr(self, f.name) for f in fields(self)] -- 2.47.3