diff --git a/psycopg/typecast_datetime.c b/psycopg/typecast_datetime.c index 44e1d315..b105a4c4 100644 --- a/psycopg/typecast_datetime.c +++ b/psycopg/typecast_datetime.c @@ -103,7 +103,7 @@ _parse_inftz(const char *str, PyObject *curs) goto exit; } -#if PY_VERSION_HEX < 0x03070000 +#if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x03070000 { PyObject *tzoff; if (!(tzoff = PyDelta_FromDSU(0, 0, 0))) { goto exit; }