weak_ref is NOT deprecated in 2.17, still needed