GH-93521: For dataclasses, filter out `__weakref__` slot if present in bases (GH-93535)

(cherry picked from commit 5849af7a80166e9e82040e082f22772bd7cf3061)

Co-authored-by: Bluenix <bluenixdev@gmail.com>
3 files changed