◐ Shell
clean mode source ↗

gh-118033: Fix `__weakref__` not set for generic dataclasses by sobolevn · Pull Request #118099 · python/cpython

This looks fine to me. Sorry I didn't see the notification sooner that you requested another review!

I still think the best version of this might look at __weakrefoffset__ and __dictrefoffset__ always to decide on those two slots, but I agree that's an edge case and can be handled separately; this is still a clear improvement and fixes the original bug.