diff --git a/pandas/_libs/src/compat_helper.h b/pandas/_libs/src/compat_helper.h index 8f86bb3f8e62f..73787023c27b7 100644 --- a/pandas/_libs/src/compat_helper.h +++ b/pandas/_libs/src/compat_helper.h @@ -26,7 +26,7 @@ the macro, which restores compat. https://bugs.python.org/issue29943 */ -#if PY_VERSION_HEX < 0x03070000 && defined(PySlice_GetIndicesEx) +#if ! defined(PYPY_VERSION) && PY_VERSION_HEX < 0x03070000 && defined(PySlice_GetIndicesEx) #undef PySlice_GetIndicesEx #endif