Revert some of 85a5c7ae61b342be7d66f793a7ef3b76437adf21 for better Cython compilation