Skip to content

[mypyc] Fix unsafe borrowing of instance attributes with free-threading#21688

Merged
JukkaL merged 6 commits into
masterfrom
mypyc-fix-attr-borrow
Jul 7, 2026
Merged

[mypyc] Fix unsafe borrowing of instance attributes with free-threading#21688
JukkaL merged 6 commits into
masterfrom
mypyc-fix-attr-borrow

Conversation

@JukkaL

@JukkaL JukkaL commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Don't borrow native attributes any more, except for final native attributes (these can't be rebound, so they are safe to borrow), and attributes with vec types (vec requires explicit synchronization by design).

Work on mypyc/mypyc#1203.

I used coding agent assist for this, but manually reviewed changes.

@JukkaL JukkaL merged commit cfc0734 into master Jul 7, 2026
18 checks passed
@JukkaL JukkaL deleted the mypyc-fix-attr-borrow branch July 7, 2026 11:39
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.

2 participants