PyPy does not have PyDateTime_TimeZone_UTC

Fixes https://github.com/psycopg/psycopg2/issues/1398
This commit is contained in:
John Vandenberg 2021-12-03 13:52:05 +08:00 committed by Daniele Varrazzo
parent 53bda13afa
commit 4b637ec34a

View File

@ -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; }