]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-110014: Remove PY_TIMEOUT_MAX from limited C API (#110217)
authorVictor Stinner <vstinner@python.org>
Mon, 2 Oct 2023 16:07:56 +0000 (18:07 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 16:07:56 +0000 (18:07 +0200)
commit4d0d1c3866cc408ff3382a9a0220ac0e4f2b3b34
treee64710870fc9e41b50cba8b563e2a509ea39309a
parent732ad44cec971be5255b1accbac6555d3615c2bf
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.
Doc/data/stable_abi.dat
Doc/whatsnew/3.13.rst
Include/cpython/pythread.h
Include/pythread.h
Lib/test/test_stable_abi_ctypes.py
Misc/NEWS.d/next/C API/2023-10-02-13-39-57.gh-issue-110014.gfQ4jU.rst [new file with mode: 0644]
Misc/stable_abi.toml
PC/python3dll.c