Commit 1d2e3ab3 authored by Allen Lavoie's avatar Allen Lavoie Committed by TensorFlower Gardener
Browse files

Always call PyObject_ClearWeakRefs

This seems to work in Python 2 and be necessary for correctness in Python 3. weakreflist is not set and yet there are weakrefs which need to be cleared.

Oddly it's only the weak key dictionary that fails in Python 3 before removing the conditional; using weakref.ref on its own seems fine.

PiperOrigin-RevId: 229645639
parent 1961871d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment