summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-02 16:07:56 (GMT)
committerGitHub <noreply@github.com>2023-10-02 16:07:56 (GMT)
commit4d0d1c3866cc408ff3382a9a0220ac0e4f2b3b34 (patch)
treee64710870fc9e41b50cba8b563e2a509ea39309a /Misc
parent732ad44cec971be5255b1accbac6555d3615c2bf (diff)
downloadcpython-4d0d1c3866cc408ff3382a9a0220ac0e4f2b3b34.zip
cpython-4d0d1c3866cc408ff3382a9a0220ac0e4f2b3b34.tar.gz
cpython-4d0d1c3866cc408ff3382a9a0220ac0e4f2b3b34.tar.bz2
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/C API/2023-10-02-13-39-57.gh-issue-110014.gfQ4jU.rst2
-rw-r--r--Misc/stable_abi.toml4
2 files changed, 2 insertions, 4 deletions
diff --git a/Misc/NEWS.d/next/C API/2023-10-02-13-39-57.gh-issue-110014.gfQ4jU.rst b/Misc/NEWS.d/next/C API/2023-10-02-13-39-57.gh-issue-110014.gfQ4jU.rst
new file mode 100644
index 0000000..3a5ff7d
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2023-10-02-13-39-57.gh-issue-110014.gfQ4jU.rst
@@ -0,0 +1,2 @@
+Remove undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API.
+Patch by Victor Stinner.
diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml
index 46e2307..8df3f85 100644
--- a/Misc/stable_abi.toml
+++ b/Misc/stable_abi.toml
@@ -1843,10 +1843,6 @@
[function.PyThread_start_new_thread]
added = '3.2'
-# Not mentioned in PEP 384, was implemented as a macro in Python <= 3.12
-[data.PY_TIMEOUT_MAX]
- added = '3.2'
-
# The following were added in PC/python3.def in Python 3.3:
# 7800f75827b1be557be16f3b18f5170fbf9fae08
# 9c56409d3353b8cd4cfc19e0467bbe23fd34fc92