Py_DEBUG and Py_LIMITED_API are not compatible, so compilation fails when Py_DEBUG is enabled. We should add a check for Py_DEBUG and make sure we do not use the limited api if it is in place.