This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author PythonF
Recipients PythonF
Date 2022-03-05.15:33:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When iterating over __dict__ inside a classmethod, accessing __annotations causses RuntimeError: dictionary changed size during iteration.
This only seems to affect Python 3.10.x on a Ubuntu system.

The following can be used to reproduce this issue:

class ExampleCls:
    def iter_cls(cls):
        for name, val in cls.__dict__.items():

This can be fixed for this Example by calling  _ = cls.__annotations__ before iterating over the __dict__
Date User Action Args
2022-03-05 15:33:42PythonFsetrecipients: + PythonF
2022-03-05 15:33:42PythonFsetmessageid: <>
2022-03-05 15:33:42PythonFlinkissue46930 messages
2022-03-05 15:33:42PythonFcreate