Backout changeset 46393019b650

test_capi is failing and the fix is not trivial, I prefer to revert
7 files changed