Skip to content

Fix potential race#113

Merged
DavidCEllis merged 3 commits into
mainfrom
fix-potential-race
Jun 13, 2026
Merged

Fix potential race#113
DavidCEllis merged 3 commits into
mainfrom
fix-potential-race

Conversation

@DavidCEllis

Copy link
Copy Markdown
Owner

Fix a potential race condition in MethodMaker. This adds the restriction that methods now have to be added by add_methods in order to properly support this.

This is a fix for a potential race where two threads both attempt to generate the method
simultaneously and one succeeds before the other can find itself in the MRO. This would
trigger an AttributeError if hit.

Some test tweaks are required where this wasn't used.
This prevents them from following the MRO and getting fields/flags/methods from parent
classes.
@DavidCEllis DavidCEllis merged commit 5acf791 into main Jun 13, 2026
5 checks passed
@DavidCEllis DavidCEllis deleted the fix-potential-race branch June 13, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant