I think you swapped the bodies of these two if statements around. In the original code, the _update_provides_requires() call was in the isinstance() check, but here it's in the type comparison check. Was that intentional?