[3.11] gh-99184: Bypass instance attribute access in `repr` of `weakref.ref` (GH-99244) (#103789)

gh-99184: Bypass instance attribute access in `repr` of `weakref.ref` (GH-99244)
(cherry picked from commit 58b6be3791f55ceb550822ffd8664eca10fd89c4)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 files changed