Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: proper weakref support #19056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Conversation

BobTheBuidler
Copy link

@BobTheBuidler BobTheBuidler commented May 8, 2025

This is the beginning of a PR intended to fix a compatibility issue between mypyc and weakrefs

Fixes mypyc/mypyc#1102

@BobTheBuidler
Copy link
Author

BobTheBuidler commented May 8, 2025

I've added a supports_weakref attribute to ClassIR and a check to add a weakref slot in has has_dict is false but supports_weakref is True

I have not yet added any logic for setting supports_weakref, it is currently always set == cls.has_dict. I'm thinking to implement one or more of the options listed here: mypyc/mypyc#1102

Something in this PR has broken your serialization tests, it would be helpful if somebody could share some pointers wrt where I should look.

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.

Compatibility issues with weakrefs
1 participant