gh-110014: Remove PY_TIMEOUT_MAX from limited C API (#110217)

If the timeout is greater than PY_TIMEOUT_MAX,
PyThread_acquire_lock_timed() uses a timeout of PY_TIMEOUT_MAX
microseconds, which is around 280.6 years. This case is unlikely and
limiting a timeout to 280.6 years sounds like a reasonable trade-off.

The constant PY_TIMEOUT_MAX is not used in PyPI top 5,000 projects.
This commit is contained in:
Victor Stinner 2023-10-02 18:07:56 +02:00 committed by GitHub
parent 732ad44cec
commit 4d0d1c3866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 20 deletions

View file

@ -1,5 +1,4 @@
role,name,added,ifdef_note,struct_abi_kind
var,PY_TIMEOUT_MAX,3.2,,
macro,PY_VECTORCALL_ARGUMENTS_OFFSET,3.12,,
function,PyAIter_Check,3.10,,
function,PyArg_Parse,3.2,,