gh-118033: Fix __weakref__ not set for generic dataclasses
#118099
+118
−3
Merged