.. __: https://numpy.org/doc/stable/reference/arrays.scalars.html#built-in-scalar-types
-Current release
----------------
-
Psycopg 3.1.13 (unreleased)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Raise `DataError` instead of whatever internal failure trying to dump a
`~datetime.time` object with with a `!tzinfo` specified as
`~zoneinfo.ZoneInfo` (ambiguous offset, see :ticket:`#652`).
+- Handle gracefully EINTR on signals instead of raising `InterruptedError`,
+ consistently with :pep:`475` guideline (:ticket:`#667`).
+Current release
+---------------
+
Psycopg 3.1.12
^^^^^^^^^^^^^^
timeout_ms = (int)(timeout * SEC_TO_MS);
}
+retry_eintr:
+
Py_BEGIN_ALLOW_THREADS
errno = 0;
select_rv = poll(&input_fd, 1, timeout_ms);
Py_END_ALLOW_THREADS
+ /* The grace of PEP 475 */
+ if (errno == EINTR) {
+ goto retry_eintr;
+ }
+
if (select_rv < 0) { goto error; }
if (PyErr_CheckSignals()) { goto finally; }
tvptr = &tv;
}
+retry_eintr:
+
Py_BEGIN_ALLOW_THREADS
errno = 0;
select_rv = select(fileno + 1, &ifds, &ofds, &efds, tvptr);
Py_END_ALLOW_THREADS
+ /* The grace of PEP 475 */
+ if (errno == EINTR) {
+ goto retry_eintr;
+ }
+
if (select_rv < 0) { goto error; }
if (PyErr_CheckSignals()) { goto finally; }