Skip to content

read out class.__dict__ to avoid concurrent modification#310

Merged
ax3l merged 2 commits into
pybind:mainfrom
htruscott:dict_names
Jun 3, 2026
Merged

read out class.__dict__ to avoid concurrent modification#310
ax3l merged 2 commits into
pybind:mainfrom
htruscott:dict_names

Conversation

@htruscott

Copy link
Copy Markdown
Contributor

Fix RuntimeError: dictionary changed size during iteration in ParserDispatchMixin._iter_class_members when handling a class whose __dict__ is updated by getattr. Fix is to read out __dict__ keys into a list then iter. Resolves #309.

Signed-off-by: htruscott <harrison@harriscott.net>
@skarndev

Copy link
Copy Markdown
Contributor

Please fix formatting issues as described in the ruff job output (extra semicolon)

@ax3l ax3l added the bug Something isn't working label Jun 3, 2026
@ax3l

ax3l commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

retriggering CI

@ax3l ax3l closed this Jun 3, 2026
@ax3l ax3l reopened this Jun 3, 2026
@ax3l ax3l closed this Jun 3, 2026
@ax3l ax3l reopened this Jun 3, 2026

@ax3l ax3l left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix!

@ax3l ax3l self-assigned this Jun 3, 2026
@ax3l ax3l merged commit 083e185 into pybind:main Jun 3, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuntimeError: dictionary changed size during iteration

3 participants