bpo-36109: Fix random test_descr failure. by serhiy-storchaka · Pull Request #12044 · python/cpython
Although this fixes the failure, I think it may be making the test not testing what is supposed to check due to the fact that the __ eq __ may be called twice or in a different situation that the test is expecting (check the bpo for more info).
Edit: I have updated the bpo, this is actually the right fix once we started to use PyDict_GetItemWithError instead of PyDict_GetItem..