clear BufferedRWPair weakrefs on deallocation (closes #22517)
merge 3.3 (#22517)
prevent overflow in unicode_repr (closes #22520)
merge 3.3 (#22520)