From 8eef757fc63a17f34a14920ec21a038fbeb67d46 2022-08-30 08:31:05 From: Matthias Bussonnier Date: 2022-08-30 08:31:05 Subject: [PATCH] Merge pull request #13732 from hhoppe/main Let %autoreload work on modules with frozen dataclasses --- diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py index 816d2f3..a0a8c27 100644 --- a/IPython/extensions/autoreload.py +++ b/IPython/extensions/autoreload.py @@ -300,7 +300,7 @@ def update_instances(old, new): for ref in refs: if type(ref) is old: - ref.__class__ = new + object.__setattr__(ref, "__class__", new) def update_class(old, new):